Bug #266493 - Never return a long from vercmp() since that can trigger an
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:16:36 +0000 (07:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:16:36 +0000 (07:16 -0000)
commit45f51c82de8186c6648ea9ea4e76411690029583
treeb29166f1d2d3ddff11a23ca0f0278933a5cee1f6
parentca074372712cb4eb4e730befb08d682fd1eb8bfe
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. (trunk r13353)

svn path=/main/branches/2.1.6/; revision=13509
pym/portage/versions.py