[PATCH 1/4] mailman: Improve fedora-mailing-list-setup error when mailman's not installed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 configs/mailman/fedora-mailing-list-setup |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configs/mailman/fedora-mailing-list-setup b/configs/mailman/fedora-mailing-list-setup
index 80b2c58..a2bffd2 100755
--- a/configs/mailman/fedora-mailing-list-setup
+++ b/configs/mailman/fedora-mailing-list-setup
@@ -19,10 +19,6 @@
 """Create a new mailing list according to Fedora's initial list creation guidelines."""
 
 import sys
-
-sys.path.append('/usr/lib/mailman')
-sys.path.append('/usr/lib/mailman/bin')
-
 import pwd
 import grp
 import os
@@ -30,7 +26,13 @@ import getpass
 import getopt
 import sha
 
-import paths
+try:
+    sys.path.append('/usr/lib/mailman/bin')
+    import paths
+except ImportError:
+    print >> sys.stderr, 'Failed to import mailman paths module.'
+    sys.exit(1)
+
 from Mailman import mm_cfg
 from Mailman import MailList
 from Mailman import Utils
-- 
1.6.6

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux