summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorYves Müller <uves@spline.de>2013-08-14 11:11:43 +0200
committerroot <root@vm-staticweb.spline.inf.fu-berlin.de>2013-08-14 11:11:43 +0200
commit9159492e38a46a36a861600427f0589f2c4ec180 (patch)
tree59b135a542bcebc415dd249eb6024cc7eabe0402 /utils.py
parent8993442d0a9a480c57774a3496f58d66ed9e6f8a (diff)
downloadwww-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.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 1a222c8..fa76138 100644
--- a/utils.py
+++ b/utils.py
@@ -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)
+]