Commit d1909792 by Bach Dániel

handle exceptions in get_driver_version()

parent 3230b2c6
...@@ -621,12 +621,16 @@ def get_ram_size(): ...@@ -621,12 +621,16 @@ def get_ram_size():
@celery.task @celery.task
def get_driver_version(): def get_driver_version():
from git import Repo from git import Repo
repo = Repo(path=os.getcwd()) try:
lc = repo.log()[0] repo = Repo(path=os.getcwd())
return {'branch': repo.active_branch, lc = repo.log()[0]
'commit': lc.id_abbrev, return {'branch': repo.active_branch,
'commit_text': lc.summary, 'commit': lc.id_abbrev,
'is_dirty': repo.is_dirty} 'commit_text': lc.summary,
'is_dirty': repo.is_dirty}
except:
logging.exception("Unhandled exception: ")
return None
@celery.task @celery.task
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment