From a7e0e96e4990ed2563000fcda673c7e9807eebae Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 7 Sep 2020 15:16:00 +0530 Subject: [PATCH] chore: Drop dead code --- frappe/utils/change_log.py | 1 - frappe/utils/gitutils.py | 24 ------------------------ 2 files changed, 25 deletions(-) delete mode 100644 frappe/utils/gitutils.py diff --git a/frappe/utils/change_log.py b/frappe/utils/change_log.py index c75b3289db..29fee2bac0 100644 --- a/frappe/utils/change_log.py +++ b/frappe/utils/change_log.py @@ -9,7 +9,6 @@ import frappe import requests import subprocess # nosec from frappe.utils import cstr -from frappe.utils.gitutils import get_app_branch from frappe import _, safe_decode diff --git a/frappe/utils/gitutils.py b/frappe/utils/gitutils.py deleted file mode 100644 index 10268a6581..0000000000 --- a/frappe/utils/gitutils.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import unicode_literals - -import subprocess - -def get_app_branch(app): - '''Returns branch of an app''' - try: - branch = subprocess.check_output('cd ../apps/{0} && git rev-parse --abbrev-ref HEAD'.format(app), - shell=True) - branch = branch.decode('utf-8') - branch = branch.strip() - return branch - except Exception: - return '' - -def get_app_last_commit_ref(app): - try: - commit_id = subprocess.check_output('cd ../apps/{0} && git rev-parse HEAD'.format(app), - shell=True) - commit_id = commit_id.decode('utf-8') - commit_id = commit_id.strip()[:7] - return commit_id - except Exception: - return ''