[pypy-svn] pypy commit 5a65de47a039: Only split hg id -t output if there is output
Bitbucket
commits-noreply at bitbucket.org
Tue Dec 14 17:19:37 CET 2010
# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Daniel Neuhäuser <dasdasich at gmail.com>
# Date 1292343498 -3600
# Node ID 5a65de47a039ef268b92f5cede083b437aa5680d
# Parent 0e3099e3cc33d9036ee057e45c1040add5299f97
Only split hg id -t output if there is output
--- a/pypy/module/sys/version.py
+++ b/pypy/module/sys/version.py
@@ -118,7 +118,11 @@ def get_mercurial_info(space):
hgid = p.stdout.read().strip()
p = Popen([str(hgexe), 'id', '-t', pypyroot], stdout=PIPE, env=env)
- hgtag = p.stdout.read().strip().split()[0]
+ output = p.stdout.read().strip()
+ if output:
+ hgtag = output.split()[0]
+ else:
+ hgtag = None
if hgtag == 'tip':
# use the branch instead
More information about the Pypy-commit
mailing list