summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-13 00:50:54 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-13 00:50:54 +0000
commit4ab2e29f2881596bee4dbf065aa3ce0e92d870fd (patch)
tree0ccc52ff6389357b5ad6601fb3784f047599cb62
parent1c51da4fc08f5f9369daea9e176a3b31756d1c14 (diff)
downloadportage-4ab2e29f2881596bee4dbf065aa3ce0e92d870fd.tar.gz
portage-4ab2e29f2881596bee4dbf065aa3ce0e92d870fd.tar.bz2
portage-4ab2e29f2881596bee4dbf065aa3ce0e92d870fd.zip
For bug #154921, prevent an IndexError when a + is in USE.
svn path=/main/trunk/; revision=5021
-rw-r--r--pym/portage.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 2f146a019..13646b2fb 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1691,6 +1691,8 @@ class config:
writemsg(red("USE flags should not start with a '+': %s\n" % x),
noiselevel=-1)
x=x[1:]
+ if not x:
+ continue
if (x[0]=="-"):
if (x[1:] in myflags):
@@ -1758,6 +1760,8 @@ class config:
writemsg(colorize("BAD", "USE flags should not start " + \
"with a '+': %s\n" % x), noiselevel=-1)
x = x[1:]
+ if not x:
+ continue
if x[0] == "-":
try: