Bug #266493 - Never return a long from vercmp() since that can trigger an
authorZac Medico <zmedico@gentoo.org>
Fri, 17 Apr 2009 21:08:36 +0000 (21:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 17 Apr 2009 21:08:36 +0000 (21:08 -0000)
commit0f7a45f60e182c1aea429fa2109e9caac9152eab
tree576aadb53b3e52f26282162895a59231c5bc40b7
parentcf0c149eff981c58650b3961d20be87018d8d606
Bug #266493 - Never return a long from vercmp() since that can trigger an
OverflowError if it's returned by a __cmp__ implementation. Thanks to
Douglas Anderson <dja@gendja.com> for the initial patch. I've modified it
to use the (a > b) - (a < b) construct as suggested in the py3k docs, since
cmp() is no longer supported in py3k.

svn path=/main/trunk/; revision=13353
pym/portage/versions.py