Only treat non-negative integers as valid in insert_optional_args().
authorZac Medico <zmedico@gentoo.org>
Sat, 1 Aug 2009 20:02:37 +0000 (20:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 1 Aug 2009 20:02:37 +0000 (20:02 -0000)
svn path=/main/trunk/; revision=13874

pym/_emerge/main.py

index ca38570518a0f625570e6529a698a3916cfea118..99ae3d1380f4452a0dcbfa62c7cbbe00bc4097ed 100644 (file)
@@ -368,10 +368,9 @@ def insert_optional_args(args):
        class valid_integers(object):
                def __contains__(self, s):
                        try:
-                               int(s)
+                               return int(s) >= 0
                        except (ValueError, OverflowError):
                                return False
-                       return True
 
        valid_integers = valid_integers()