---
configs/mailman/fedora-mailing-list-setup | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/configs/mailman/fedora-mailing-list-setup
b/configs/mailman/fedora-mailing-list-setup
index a2bffd2..471e77d 100755
--- a/configs/mailman/fedora-mailing-list-setup
+++ b/configs/mailman/fedora-mailing-list-setup
@@ -190,13 +190,20 @@ def ask_questions(listType):
return listname, admin
-# work out where we are running fedorahosted lists require extra restrictions
-hostname = os.uname()[1]
-if hostname.startswith("hosted"):
- listType = "hosted"
-else:
- listType = "other"
-
-listname, admin = ask_questions(listType)
-switch_user()
-create_list(listname, '%s(a)fedoraproject.org' % admin)
+def main():
+ # Check where we are. Lists on
fedorahosted.org have extra restrictions.
+ hostname = os.uname()[1]
+ if hostname.startswith("hosted"):
+ listType = "hosted"
+ else:
+ listType = "other"
+
+ listname, admin = ask_questions(listType)
+ switch_user()
+ create_list(listname, '%s(a)fedoraproject.org' % admin)
+
+if __name__ == '__main__':
+ try:
+ main()
+ except KeyboardInterrupt:
+ sys.exit(1)
--
1.6.6