From 67c671679e4d02d2f53b149a2d57d0e3bccb6028 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 1 Aug 2009 20:02:37 +0000 Subject: [PATCH] Only treat non-negative integers as valid in insert_optional_args(). svn path=/main/trunk/; revision=13874 --- pym/_emerge/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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() -- 2.26.2