aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oe
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oe')
-rw-r--r--lib/oe/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/oe/utils.py b/lib/oe/utils.py
index 3469700726..2169ed212e 100644
--- a/lib/oe/utils.py
+++ b/lib/oe/utils.py
@@ -1,3 +1,10 @@
+def uniq(iterable):
+ seen = set()
+ for i in iterable:
+ if i not in seen:
+ yield i
+ seen.add(i)
+
def read_file(filename):
try:
f = file( filename, "r" )