Fixed git version check on server #71

This commit is contained in:
Artem30801
2020-02-25 16:31:40 +03:00
parent 5b44c1a591
commit e5c60637fa

View File

@@ -18,7 +18,10 @@ ModelStateRole = 999
def get_git_version(): # TODO import from animation
return subprocess.check_output("git log --pretty=format:'%h' -n 1", shell=True).decode('UTF-8')
try:
return subprocess.check_output("git log --pretty=format:'%h' -n 1", shell=True).decode('UTF-8')
except subprocess.CalledProcessError: # when no git repository info present
return True # todo probably add special file
class CheckState: