Fix paren_normalize logic.
authorZac Medico <zmedico@gentoo.org>
Thu, 24 May 2007 03:36:01 +0000 (03:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 24 May 2007 03:36:01 +0000 (03:36 -0000)
svn path=/main/trunk/; revision=6610

pym/portage/dep.py

index d1e22376e9b2eab0e02fa81a1d042411f300e1d2..927cc6ae110237bf12eb5cc5b546214f4ecefcd4 100644 (file)
@@ -127,15 +127,12 @@ class paren_normalize(list):
                for x in i:
                        if isinstance(x, basestring):
                                if x == '||':
-                                       x = i.next()
+                                       x = self._zap_parens(i.next(), [], disjunction=True)
                                        if len(x) == 1:
-                                               if isinstance(x[0], basestring):
-                                                       dest.append(x[0])
-                                               else:
-                                                       self._zap_parens(x, dest, disjunction=disjunction)
+                                               dest.append(x[0])
                                        else:
                                                dest.append("||")
-                                               dest.append(self._zap_parens(x, [], disjunction=True))
+                                               dest.append(x)
                                elif x.endswith("?"):
                                        dest.append(x)
                                        dest.append(self._zap_parens(i.next(), []))