Permalink
Browse files

cola/version: capture stderr to avoid printing bogus errors to the shell

We weren't capturing stderr which meant that cola was printing
	fatal: could not describe <sha1>

Signed-off-by: David Aguilar <davvid@gmail.com>
  • Loading branch information...
1 parent 19b7e9a commit a5cf5183ce913b07bb8933535bd329c274be8871 @davvid committed Jan 31, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 cola/version.py
View
@@ -18,7 +18,8 @@ def git_describe_version():
"""Inspect the cola git repository and return the current version."""
path = sys.path[0]
try:
- v = git.Git.execute(['git', 'describe', '--tags', '--abbrev=4'])
+ v = git.Git.execute(['git', 'describe', '--tags', '--abbrev=4'],
+ with_stderr=True)
except git.GitCommandError, e:
raise VersionUnavailable(str(e))
if not re.match(r'^v[0-9]', v):

0 comments on commit a5cf518

Please sign in to comment.