[CalendarServer-changes] [15434] CalDAVTester/trunk/src/httpshandler.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 11 10:38:40 PST 2016


Revision: 15434
          http://trac.calendarserver.org//changeset/15434
Author:   cdaboo at apple.com
Date:     2016-01-11 10:38:40 -0800 (Mon, 11 Jan 2016)
Log Message:
-----------
Better.

Modified Paths:
--------------
    CalDAVTester/trunk/src/httpshandler.py

Modified: CalDAVTester/trunk/src/httpshandler.py
===================================================================
--- CalDAVTester/trunk/src/httpshandler.py	2016-01-11 18:35:11 UTC (rev 15433)
+++ CalDAVTester/trunk/src/httpshandler.py	2016-01-11 18:38:40 UTC (rev 15434)
@@ -25,12 +25,9 @@
 
 # ssl module may be missing some of these attributes depending on how
 # the backend ssl library is configured.
-if hasattr(sslmodule, "PROTOCOL_TLSv1"):
-    cached_types += ((set(), sslmodule.PROTOCOL_TLSv1),)
-if hasattr(sslmodule, "PROTOCOL_SSLv3"):
-    cached_types += ((set(), sslmodule.PROTOCOL_SSLv3),)
-if hasattr(sslmodule, "PROTOCOL_SSLv23"):
-    cached_types += ((set(), sslmodule.PROTOCOL_SSLv23),)
+for attrname in ("PROTOCOL_TLSv1", "PROTOCOL_SSLv3", "PROTOCOL_SSLv23"):
+    if hasattr(sslmodule, attrname):
+        cached_types += ((set(), getattr(sslmodule, attrname)),)
 if len(cached_types) == 0:
     raise RuntimeError("Unable to find suitable SSL protocol to use")
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160111/c581f8b5/attachment.html>


More information about the calendarserver-changes mailing list