diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-08-01 20:02:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-08-01 20:02:37 +0000 |
commit | 67c671679e4d02d2f53b149a2d57d0e3bccb6028 (patch) | |
tree | 4b8c78ad7cd1013c80968c816b87ef4fc53483c6 | |
parent | 45e21cba91318dd00b93aebfeafe86e4e836743a (diff) | |
download | portage-67c671679e4d02d2f53b149a2d57d0e3bccb6028.tar.gz portage-67c671679e4d02d2f53b149a2d57d0e3bccb6028.tar.bz2 portage-67c671679e4d02d2f53b149a2d57d0e3bccb6028.zip |
Only treat non-negative integers as valid in insert_optional_args().
svn path=/main/trunk/; revision=13874
-rw-r--r-- | pym/_emerge/main.py | 3 |
1 files changed, 1 insertions, 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() |