Commit 87eb14ec by Kálmán Viktor

fix get_driver_version

parent 043d25e4
...@@ -641,13 +641,13 @@ def get_driver_version(): ...@@ -641,13 +641,13 @@ def get_driver_version():
from git import Repo from git import Repo
try: try:
repo = Repo(path=os.getcwd()) repo = Repo(path=os.getcwd())
lc = repo.log()[0] lc = repo.head.commit
return {'branch': repo.active_branch, return {'branch': repo.active_branch.name,
'commit': lc.id_abbrev, 'commit': lc.hexsha,
'commit_text': lc.summary, 'commit_text': lc.summary,
'is_dirty': repo.is_dirty} 'is_dirty': repo.is_dirty()}
except: except Exception as e:
logging.exception("Unhandled exception: ") logging.exception("Unhandled exception: %s", e)
return None return None
......
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