diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-25 04:21:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-25 04:21:33 +0000 |
commit | e3ceb03672cc394df3de50c7ee81f7213b76c9c8 (patch) | |
tree | 82b6afd7850df19c0be44673ced347890530dc5c /pym/portage_dep.py | |
parent | 5e39470e1d14bf9cca26bc955354f409ddd8b2d4 (diff) | |
download | portage-e3ceb03672cc394df3de50c7ee81f7213b76c9c8.tar.gz portage-e3ceb03672cc394df3de50c7ee81f7213b76c9c8.tar.bz2 portage-e3ceb03672cc394df3de50c7ee81f7213b76c9c8.zip |
Fix paren_reduce() so that it appropriately raises an InvalidDependString()
in some cases, instead of a nonsense AttributeError. (trunk r10392)
svn path=/main/branches/2.1.2/; revision=10408
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r-- | pym/portage_dep.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 4fb6ddde9..9ad8421c9 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -96,6 +96,9 @@ def paren_reduce(mystr,tokenize=1): subsec = strip_empty(subsec.split(" ")) return [mylist+subsec,tail] return mylist+[subsec],tail + if not isinstance(tail, basestring): + raise portage_exception.InvalidDependString( + "malformed syntax: '%s'" % mystr) mystr = tail if freesec: if tokenize: |