diff options
Diffstat (limited to 'devbot/utils.py')
-rw-r--r-- | devbot/utils.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/devbot/utils.py b/devbot/utils.py index 2864948..aed5de0 100644 --- a/devbot/utils.py +++ b/devbot/utils.py @@ -1,18 +1 @@ -import os -import subprocess - devnull = open("/dev/null", "w") - -def get_commit_id(dir): - orig_cwd = os.getcwd() - os.chdir(dir) - - try: - commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"], - stderr=devnull).strip() - except subprocess.CalledProcessError: - commit_id = None - - os.chdir(orig_cwd) - - return commit_id |