From 8993442d0a9a480c57774a3496f58d66ed9e6f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yves=20M=C3=BCller?= Date: Wed, 14 Aug 2013 10:36:00 +0200 Subject: fix problem with invalid maintainer list --- utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils.py') 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) +] -- cgit v1.2.3-1-g7c22