diff options
Diffstat (limited to '')
-rw-r--r-- | portato/helper.py | 2 |
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 |