From: Zac Medico Date: Sun, 25 May 2008 04:21:33 +0000 (-0000) Subject: Fix paren_reduce() so that it appropriately raises an InvalidDependString() X-Git-Tag: v2.1.5.3~55 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3ceb03672cc394df3de50c7ee81f7213b76c9c8;p=portage.git 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 --- 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: