summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-13 18:04:50 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-13 18:04:50 +0000
commitba85ab2fc704f1617c7b60d4f3e454968b705376 (patch)
tree926edcf51bbc12f5fe634110a952b657c9f534a2
parentf11c17868e245fa9a00b90ef828256362c0aed67 (diff)
downloadportage-ba85ab2fc704f1617c7b60d4f3e454968b705376.tar.gz
portage-ba85ab2fc704f1617c7b60d4f3e454968b705376.tar.bz2
portage-ba85ab2fc704f1617c7b60d4f3e454968b705376.zip
Make strip_empty() return a nedw list instead of working in-place. Thanks to
René Neumann <rene.neumann@necoro.net> for the suggestion. svn path=/main/trunk/; revision=9460
-rw-r--r--pym/portage/dep.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py
index bf42d2ba8..2a1a3cfa5 100644
--- 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):
"""