Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d1909792
authored
Oct 31, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle exceptions in get_driver_version()
parent
3230b2c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
vmdriver.py
+10
-6
No files found.
vmdriver.py
View file @
d1909792
...
...
@@ -621,12 +621,16 @@ def get_ram_size():
@celery.task
def
get_driver_version
():
from
git
import
Repo
repo
=
Repo
(
path
=
os
.
getcwd
())
lc
=
repo
.
log
()[
0
]
return
{
'branch'
:
repo
.
active_branch
,
'commit'
:
lc
.
id_abbrev
,
'commit_text'
:
lc
.
summary
,
'is_dirty'
:
repo
.
is_dirty
}
try
:
repo
=
Repo
(
path
=
os
.
getcwd
())
lc
=
repo
.
log
()[
0
]
return
{
'branch'
:
repo
.
active_branch
,
'commit'
:
lc
.
id_abbrev
,
'commit_text'
:
lc
.
summary
,
'is_dirty'
:
repo
.
is_dirty
}
except
:
logging
.
exception
(
"Unhandled exception: "
)
return
None
@celery.task
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment