From e3ceb03672cc394df3de50c7ee81f7213b76c9c8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 25 May 2008 04:21:33 +0000 Subject: [PATCH] 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 --- pym/portage_dep.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.26.2