summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorYves Müller <uves@spline.de>2013-08-14 10:36:00 +0200
committerroot <root@vm-staticweb.spline.inf.fu-berlin.de>2013-08-14 10:36:00 +0200
commit8993442d0a9a480c57774a3496f58d66ed9e6f8a (patch)
treeb0412a05261295c9cad88c8cc6fc7fd9deb63050 /utils.py
parent89a96ac7f66f39ef5ee6ad9b0c5e7a4b195943ae (diff)
downloadwww-8993442d0a9a480c57774a3496f58d66ed9e6f8a.tar.gz
www-8993442d0a9a480c57774a3496f58d66ed9e6f8a.tar.bz2
www-8993442d0a9a480c57774a3496f58d66ed9e6f8a.zip
fix problem with invalid maintainer list
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 1ba7137..1a222c8 100644
--- a/utils.py
+++ b/utils.py
@@ -1,4 +1,5 @@
#!/usr/bin/python2
+import collections
def get_os_name(name):
try: return name.split(' ')[0].lower()
@@ -7,8 +8,16 @@ def get_os_name(name):
def select_with_attribute(iterable, attribute, result=True):
return [value for value in iterable if (attribute in value) == result]
+def is_iterable(obj):
+ if isinstance(obj, collections.Iterable):
+ return True
+ return False
filters = [
('select_with_attribute', select_with_attribute),
('get_os_name', get_os_name)
]
+
+tests = [
+ ('iterable', is_iterable)
+]