Skip to content

Commit

Permalink
ififuncs.py - changes back to cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranjol committed Apr 6, 2018
1 parent 7f38263 commit 287556b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ififuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ def get_script_version(scriptname):
'''
uses git to get SHA:DATETIME for a script
'''
current_dir = os.getcwd()
home = os.path.expanduser("~/")
os.chdir(home)
if os.path.isdir('ifigit/ifiscripts'):
Expand All @@ -735,6 +736,7 @@ def get_script_version(scriptname):
script_version = subprocess.check_output([
'git', 'log', '-n', '1', '--pretty=format:%H:%aI', scriptname
])
os.chdir(current_dir)
return script_version


Expand Down

0 comments on commit 287556b

Please sign in to comment.