Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundle2.py @ 30031:0f6d6fdd3c2a
pycompat: provide 'ispy3' constant
We compare version_info at several places, which seems enough to define
a constant.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 28 Sep 2016 20:01:23 +0900 |
parents | 2c302c654451 |
children | 9626022feaa4 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Fri Sep 30 00:27:35 2016 +0200 +++ b/mercurial/bundle2.py Wed Sep 28 20:01:23 2016 +0900 @@ -159,6 +159,7 @@ error, obsolete, pushkey, + pycompat, tags, url, util, @@ -996,7 +997,7 @@ outdebug(ui, 'closing payload chunk') # abort current part payload yield _pack(_fpayloadsize, 0) - if sys.version_info[0] >= 3: + if pycompat.ispy3: raise exc_info[0](exc_info[1]).with_traceback(exc_info[2]) else: exec("""raise exc_info[0], exc_info[1], exc_info[2]""")