diff options
author | Yves Müller <uves@spline.de> | 2013-08-14 10:36:00 +0200 |
---|---|---|
committer | root <root@vm-staticweb.spline.inf.fu-berlin.de> | 2013-08-14 10:36:00 +0200 |
commit | 8993442d0a9a480c57774a3496f58d66ed9e6f8a (patch) | |
tree | b0412a05261295c9cad88c8cc6fc7fd9deb63050 /utils.py | |
parent | 89a96ac7f66f39ef5ee6ad9b0c5e7a4b195943ae (diff) | |
download | www-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.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) +] |