diff options
author | Yves Müller <uves@spline.de> | 2013-08-14 11:11:43 +0200 |
---|---|---|
committer | root <root@vm-staticweb.spline.inf.fu-berlin.de> | 2013-08-14 11:11:43 +0200 |
commit | 9159492e38a46a36a861600427f0589f2c4ec180 (patch) | |
tree | 59b135a542bcebc415dd249eb6024cc7eabe0402 /utils.py | |
parent | 8993442d0a9a480c57774a3496f58d66ed9e6f8a (diff) | |
download | www-9159492e38a46a36a861600427f0589f2c4ec180.tar.gz www-9159492e38a46a36a861600427f0589f2c4ec180.tar.bz2 www-9159492e38a46a36a861600427f0589f2c4ec180.zip |
render also maintainers that are not spline members
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -8,6 +8,12 @@ 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 get_contact_info(maintainer): + if type(maintainer) is dict: + return maintainer.popitem() + else: + return (maintainer, "%s@spline.de" % (maintainer)) + def is_iterable(obj): if isinstance(obj, collections.Iterable): return True @@ -21,3 +27,7 @@ filters = [ tests = [ ('iterable', is_iterable) ] + +globals = [ + ('get_contact_info', get_contact_info) +] |