[CalendarServer-changes] [14721] CalendarServer/trunk/calendarserver/tools

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 29 08:19:55 PDT 2015


Revision: 14721
          http://trac.calendarserver.org//changeset/14721
Author:   cdaboo at apple.com
Date:     2015-04-29 08:19:55 -0700 (Wed, 29 Apr 2015)
Log Message:
-----------
Fix issue with unwanted warnings on linux.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/config.py
    CalendarServer/trunk/calendarserver/tools/gateway.py
    CalendarServer/trunk/calendarserver/tools/principals.py

Modified: CalendarServer/trunk/calendarserver/tools/config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/config.py	2015-04-29 15:03:49 UTC (rev 14720)
+++ CalendarServer/trunk/calendarserver/tools/config.py	2015-04-29 15:19:55 UTC (rev 14721)
@@ -17,6 +17,13 @@
 ##
 from __future__ import print_function
 
+# Suppress warning that occurs on Linux
+import sys
+if sys.platform.startswith("linux"):
+    from Crypto.pct_warnings import PowmInsecureWarning
+    import warnings
+    warnings.simplefilter("ignore", PowmInsecureWarning)
+
 """
 This tool gets and sets Calendar Server configuration keys
 """
@@ -26,7 +33,6 @@
 import plistlib
 import signal
 import subprocess
-import sys
 import xml
 
 from plistlib import readPlistFromString, writePlistToString

Modified: CalendarServer/trunk/calendarserver/tools/gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/gateway.py	2015-04-29 15:03:49 UTC (rev 14720)
+++ CalendarServer/trunk/calendarserver/tools/gateway.py	2015-04-29 15:19:55 UTC (rev 14721)
@@ -17,10 +17,16 @@
 ##
 from __future__ import print_function
 
+# Suppress warning that occurs on Linux
+import sys
+if sys.platform.startswith("linux"):
+    from Crypto.pct_warnings import PowmInsecureWarning
+    import warnings
+    warnings.simplefilter("ignore", PowmInsecureWarning)
+
 from getopt import getopt, GetoptError
 import os
 from plistlib import readPlistFromString, writePlistToString
-import sys
 import uuid
 import xml
 

Modified: CalendarServer/trunk/calendarserver/tools/principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/principals.py	2015-04-29 15:03:49 UTC (rev 14720)
+++ CalendarServer/trunk/calendarserver/tools/principals.py	2015-04-29 15:19:55 UTC (rev 14721)
@@ -17,10 +17,17 @@
 ##
 from __future__ import print_function
 
+# Suppress warning that occurs on Linux
+import sys
+if sys.platform.startswith("linux"):
+    from Crypto.pct_warnings import PowmInsecureWarning
+    import warnings
+    warnings.simplefilter("ignore", PowmInsecureWarning)
+
+
 from getopt import getopt, GetoptError
 import operator
 import os
-import sys
 import uuid
 
 from calendarserver.tools.cmdline import utilityMain, WorkerService
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150429/c9a727bf/attachment-0001.html>


More information about the calendarserver-changes mailing list