projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f11c178
)
Make strip_empty() return a nedw list instead of working in-place. Thanks to
author
Zac Medico
<zmedico@gentoo.org>
Thu, 13 Mar 2008 18:04:50 +0000
(18:04 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 13 Mar 2008 18:04:50 +0000
(18:04 -0000)
René Neumann <rene.neumann@necoro.net> for the suggestion.
svn path=/main/trunk/; revision=9460
pym/portage/dep.py
patch
|
blob
|
history
diff --git
a/pym/portage/dep.py
b/pym/portage/dep.py
index bf42d2ba85cfe70e0adbbf646f8b315e283a6158..2a1a3cfa59a8e090d4ada8687cf9ffc4081ba780 100644
(file)
--- a/
pym/portage/dep.py
+++ b/
pym/portage/dep.py
@@
-63,11
+63,7
@@
def strip_empty(myarr):
@rtype: Array
@return: The array with empty elements removed
"""
-
- for x in range(len(myarr)-1, -1, -1):
- if not myarr[x]:
- del myarr[x]
- return myarr
+ return [x for x in myarr if x]
def paren_reduce(mystr,tokenize=1):
"""