summaryrefslogtreecommitdiffstats
path: root/git_command.py
diff options
context:
space:
mode:
Diffstat (limited to 'git_command.py')
-rw-r--r--git_command.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/git_command.py b/git_command.py
index 2b3975ec..51e856a8 100644
--- a/git_command.py
+++ b/git_command.py
@@ -162,11 +162,10 @@ def RepoSourceVersion():
162 162
163 proj = os.path.dirname(os.path.abspath(__file__)) 163 proj = os.path.dirname(os.path.abspath(__file__))
164 env[GIT_DIR] = os.path.join(proj, '.git') 164 env[GIT_DIR] = os.path.join(proj, '.git')
165 165 result = subprocess.run([GIT, 'describe', HEAD], stdout=subprocess.PIPE,
166 p = subprocess.Popen([GIT, 'describe', HEAD], stdout=subprocess.PIPE, 166 encoding='utf-8', env=env, check=False)
167 env=env) 167 if result.returncode == 0:
168 if p.wait() == 0: 168 ver = result.stdout.strip()
169 ver = p.stdout.read().strip().decode('utf-8')
170 if ver.startswith('v'): 169 if ver.startswith('v'):
171 ver = ver[1:] 170 ver = ver[1:]
172 else: 171 else: