Mercurial > hg
changeset 10124:08384d8777a4 stable
setup.py: keep Python 2.3 compatibility
Though we only support Python 2.4 or greater, we should keep setup.py
compatible with earlier versions on the syntactic level. Otherwise
people will simply get a SyntaxError when trying to install Mercurial
with an old version of Python. With this change, the setup.py file can
be imported with Python 2.3 and we then issue a friendly error message
when we detect that Python is too old.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 23 Dec 2009 19:11:37 +0100 |
parents | 0ddbc0299742 |
children | 78b8acae2088 ebf69364e80f |
files | setup.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Wed Dec 23 18:40:21 2009 +0100 +++ b/setup.py Wed Dec 23 19:11:37 2009 +0100 @@ -145,8 +145,8 @@ if version.endswith('+'): version += time.strftime('%Y%m%d') elif os.path.exists('.hg_archival.txt'): - kw = dict([t.strip() for t in l.split(':', 1)] - for l in open('.hg_archival.txt')) + kw = dict([[t.strip() for t in l.split(':', 1)] + for l in open('.hg_archival.txt')]) if 'tag' in kw: version = kw['tag'] elif 'latesttag' in kw: