Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 30053:dbcef8918bbd
util: correct check of sys.version_info
sys.version is a string, and shouldn't be compared against a tuple for
version comparisons. This was always true, so we were never disabling
gc on 2.6.
>>> (2, 7) >= '2.7'
True
>>> (2, 6) >= '2.7'
True
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 07 Oct 2016 08:01:16 -0400 |
parents | ff7697b436ab |
children | 8b89521a69ba |
line wrap: on
line diff
--- a/mercurial/util.py Fri Oct 07 15:29:57 2016 +0200 +++ b/mercurial/util.py Fri Oct 07 08:01:16 2016 -0400 @@ -881,7 +881,7 @@ This garbage collector issue have been fixed in 2.7. """ - if sys.version >= (2, 7): + if sys.version_info >= (2, 7): return func def wrapper(*args, **kwargs): gcenabled = gc.isenabled()