diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-04-07 23:48:55 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-04-07 23:48:55 +0200 |
commit | f2b0f5db230e8fdfec3f5fa0fcc53766582daf6b (patch) | |
tree | 9c837c9a9e7e32f904021e46a519e46885152b11 /portato/helper.py | |
parent | 4ae9bd9a9c6ffca3301858b3c8d95ca4cf2b78dc (diff) | |
download | portato-f2b0f5db230e8fdfec3f5fa0fcc53766582daf6b.tar.gz portato-f2b0f5db230e8fdfec3f5fa0fcc53766582daf6b.tar.bz2 portato-f2b0f5db230e8fdfec3f5fa0fcc53766582daf6b.zip |
Removed the obsolete single unittest and the unique_array function
Diffstat (limited to '')
-rw-r--r-- | portato/helper.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/portato/helper.py b/portato/helper.py index 1861ae6..d271611 100644 --- a/portato/helper.py +++ b/portato/helper.py @@ -115,41 +115,6 @@ def flatten (listOfLists): return ret -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""" - # assume all elements are hashable, if so, it's linear - try: - return list(set(s)) - except TypeError: - pass - - # so much for linear. abuse sort. - try: - t = list(s) - t.sort() - except TypeError: - pass - else: - n = len(s) - assert n > 0 - last = t[0] - lasti = i = 1 - while i < n: - if t[i] != last: - t[lasti] = last = t[i] - lasti += 1 - i += 1 - return t[:lasti] - - # blah. back to original portage.unique_array - u = [] - for x in s: - if x not in u: - u.append(x) - return u - def detect_desktop_environment(): # stolen from wicd :) |