From 4ab2e29f2881596bee4dbf065aa3ce0e92d870fd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 13 Nov 2006 00:50:54 +0000 Subject: [PATCH] For bug #154921, prevent an IndexError when a + is in USE. svn path=/main/trunk/; revision=5021 --- pym/portage.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.26.2