summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/helper.py35
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 :)