From: Zac Medico Date: Sat, 1 Aug 2009 20:02:37 +0000 (-0000) Subject: Only treat non-negative integers as valid in insert_optional_args(). X-Git-Tag: v2.2_rc34~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=67c671679e4d02d2f53b149a2d57d0e3bccb6028;p=portage.git Only treat non-negative integers as valid in insert_optional_args(). svn path=/main/trunk/; revision=13874 --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index ca3857051..99ae3d138 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -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()