mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
avoid zombie git process
This commit is contained in:
parent
882ee6ace7
commit
3f21a0672d
@ -787,7 +787,7 @@ def get_version():
|
|||||||
try:
|
try:
|
||||||
import subprocess
|
import subprocess
|
||||||
real_dir = os.path.dirname(os.path.realpath(__file__))
|
real_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
git_hash = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], cwd=real_dir, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.read().decode('utf-8').strip()
|
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'], cwd=real_dir, stderr=subprocess.DEVNULL).decode('utf-8').strip()
|
||||||
assert git_hash
|
assert git_hash
|
||||||
return '%s-%s' % (__version__, git_hash)
|
return '%s-%s' % (__version__, git_hash)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user