small improves

This commit is contained in:
Hugo Wang 2016-07-18 22:24:37 +08:00
parent 6df5fbcf5e
commit 7959a97718

View file

@ -121,9 +121,10 @@ def dirty_version():
open('xonsh/dev.githash', 'w').close()
print('failed to parse git version', file=sys.stderr)
return False
sha = sha.strip('g')
replace_version(base, N)
with open('xonsh/dev.githash', 'w') as f:
f.write(sha.strip('g'))
f.write(sha)
print('wrote git version: ' + sha, file=sys.stderr)
return True