changeset 14973:5656cb5b9028

setup.py: use getattr instead of hasdattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:08:57 -0500
parents bcba68e81a81
children a2aa75118837
files setup.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: