summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-07 22:27:25 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-07 22:27:25 +0000
commit42965e0444ad4f281038341129ffae40456295dc (patch)
treeec336c926ec3ebdcdf86780050a6340fc1e17fdb /pym
parent982ce9dd9f1a864af4336c1bf229bee10fd80711 (diff)
downloadportage-42965e0444ad4f281038341129ffae40456295dc.tar.gz
portage-42965e0444ad4f281038341129ffae40456295dc.tar.bz2
portage-42965e0444ad4f281038341129ffae40456295dc.zip
Use slice instead of startwith in stack_* incremental processing.
svn path=/main/trunk/; revision=12779
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/util.py4
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