summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-07-09 23:24:18 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-07-09 23:24:18 +0200
commitb166a860bc1d645208b6ecab5270b64fca34188b (patch)
treebed4d3025498d668f88fdb5ab07949f9b3890e27 /portato/helper.py
parent107c4cc0c8f0039224505d29707ccc7eda4f5afb (diff)
parentc592c0a400099e442508ec09284e188d03fb5444 (diff)
downloadportato-b166a860bc1d645208b6ecab5270b64fca34188b.tar.gz
portato-b166a860bc1d645208b6ecab5270b64fca34188b.tar.bz2
portato-b166a860bc1d645208b6ecab5270b64fca34188b.zip
Merged in the portage-2.2 branch
Diffstat (limited to 'portato/helper.py')
-rw-r--r--portato/helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/portato/helper.py b/portato/helper.py
index 31e25d9..145716e 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -110,7 +110,6 @@ def unique_array(s):
"""Stolen from portage_utils:
lifted from python cookbook, credit: Tim Peters
Return a list of the elements in s in arbitrary order, sans duplicates"""
- n = len(s)
# assume all elements are hashable, if so, it's linear
try:
return list(set(s))
@@ -124,6 +123,7 @@ def unique_array(s):
except TypeError:
pass
else:
+ n = len(s)
assert n > 0
last = t[0]
lasti = i = 1