projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8671238
)
Make strip_empty() return a nedw list instead of working in-place. Thanks to
author
Zac Medico
<zmedico@gentoo.org>
Fri, 28 Mar 2008 11:56:50 +0000
(11:56 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 28 Mar 2008 11:56:50 +0000
(11:56 -0000)
René Neumann <rene.neumann@necoro.net> for the suggestion. (trunk r9460)
svn path=/main/branches/2.1.2/; revision=9552
pym/portage_dep.py
patch
|
blob
|
history
diff --git
a/pym/portage_dep.py
b/pym/portage_dep.py
index 2ac6ada99b26f8cddd3bfe3615153297f0075f06..5bb9c05623f9bd651a2c51fd1841e98244c55f26 100644
(file)
--- a/
pym/portage_dep.py
+++ b/
pym/portage_dep.py
@@
-44,10
+44,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):
"""