setup.py: use getattr instead of hasdattr
authorAugie Fackler <durin42@gmail.com>
Mon, 25 Jul 2011 16:08:57 -0500
changeset 14973 5656cb5b9028
parent 14972 bcba68e81a81
child 14974 a2aa75118837
setup.py: use getattr instead of hasdattr
setup.py
--- a/setup.py	Mon Jul 25 16:07:52 2011 -0500
+++ b/setup.py	Mon Jul 25 16:08:57 2011 -0500
@@ -5,7 +5,7 @@
 # 'python setup.py --help' for more options
 
 import sys, platform
-if not hasattr(sys, 'version_info') or sys.version_info < (2, 4, 0, 'final'):
+if getattr(sys, 'version_info', (0, 0, 0)) < (2, 4, 0, 'final'):
     raise SystemExit("Mercurial requires Python 2.4 or later.")
 
 if sys.version_info[0] >= 3: