# HG changeset patch # User Benoit Boissinot # Date 2009-01-15 10:41:59 # Node ID f7256cd9beffe9efd85957368781a88171ed9977 # Parent e62a456b8dc578655b53ca4978e22b662193984e recover when no version information is available diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -97,7 +97,7 @@ try: l = os.popen('hg id -it').read().split() while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags l.pop() - version = l[-1] or 'unknown' # latest tag or revision number + version = l and l[-1] or 'unknown' # latest tag or revision number if version.endswith('+'): version += time.strftime('%Y%m%d')