changed getadmins into a generic function for both for admins and other roles.
[plcrt.git] / getadmins.py
diff --git a/getadmins.py b/getadmins.py
deleted file mode 100644 (file)
index 4ed2427..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/env plcsh
-
-import sys
-
-p = GetPersons(None, ['email', 'first_name', 'last_name', 'roles', 'site_ids'])
-
-admins = filter(lambda x: sys.argv[1] in x['roles'], p)
-
-for a in admins:
-       s = GetSites(a['site_ids'], ['name'])
-       if len(s) > 0:
-               organization = s[0]['name']
-       else:
-               organization = "Unknown"
-       a['name'] = organization
-       print "%(email)s,%(first_name)s %(last_name)s,%(name)s" % a