Silence 'git unavailable' message
This commit is contained in:
parent
51a4c4b5fd
commit
c74c888506
|
@ -3,10 +3,10 @@ import subprocess
|
||||||
__version__ = "0.99.2"
|
__version__ = "0.99.2"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
|
p = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
|
||||||
stdout=subprocess.PIPE).communicate()[0]
|
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||||
|
node = p.communicate()[0]
|
||||||
if node:
|
if node:
|
||||||
__version__ += '+' + node.decode('utf-8').strip()
|
__version__ += '+' + node.decode('utf-8').strip()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue