diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 06:48:05 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 06:48:05 +0000 |
commit | d89a574a097c9b592e1859802086d16acade2dce (patch) | |
tree | 3357221d64d91e0ef70770978a053e963c0c6a04 | |
parent | 47b8a7acb731886ed7cb0c4a0aee26298ee87581 (diff) | |
download | portage-d89a574a097c9b592e1859802086d16acade2dce.tar.gz portage-d89a574a097c9b592e1859802086d16acade2dce.tar.bz2 portage-d89a574a097c9b592e1859802086d16acade2dce.zip |
Use slice instead of startwith in stack_* incremental processing. (trunk r12779)
svn path=/main/branches/2.1.6/; revision=13023
-rw-r--r-- | pym/portage/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py index 5624b5286..d5c7955fc 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -177,7 +177,7 @@ def stack_dictlist(original_dicts, incremental=0, incrementals=[], ignore_none=0 if thing == "-*": final_dict[y] = [] continue - elif thing.startswith("-"): + elif thing[:1] == '-': try: final_dict[y].remove(thing[1:]) except ValueError: @@ -223,7 +223,7 @@ def stack_lists(lists, incremental=1): if incremental: if y == "-*": new_list.clear() - elif y.startswith("-"): + elif y[:1] == '-': new_list.pop(y[1:], None) else: new_list[y] = True |