git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turn off server verification for python-2.7.9
[sfa.git]
/
sfa
/
client
/
manifolduploader.py
diff --git
a/sfa/client/manifolduploader.py
b/sfa/client/manifolduploader.py
index
f8ca0f9
..
8354e1e
100755
(executable)
--- a/
sfa/client/manifolduploader.py
+++ b/
sfa/client/manifolduploader.py
@@
-25,6
+25,10
@@
DEFAULT_URL = "http://myslice.onelab.eu:7080"
DEFAULT_PLATFORM = 'ple'
DEFAULT_URL = "http://myslice.onelab.eu:7080"
DEFAULT_PLATFORM = 'ple'
+# starting with 2.7.9 we need to turn off server verification
+import ssl
+ssl_needs_unverified_context = hasattr(ssl, '_create_unverified_context')
+
import xmlrpclib
import getpass
import xmlrpclib
import getpass
@@
-78,7
+82,12
@@
class ManifoldUploader:
# return self._proxy
url=self.url()
self.logger.debug("Connecting manifold url %s"%url)
# return self._proxy
url=self.url()
self.logger.debug("Connecting manifold url %s"%url)
- return xmlrpclib.ServerProxy(url, allow_none = True)
+ if not ssl_needs_unverified_context:
+ proxy = xmlrpclib.ServerProxy(url, allow_none = True)
+ else:
+ proxy = xmlrpclib.ServerProxy(url, allow_none = True,
+ context=ssl._create_unverified_context())
+ return proxy
# does the job for one credential
# expects the credential (string) and an optional message (e.g. hrn) for reporting
# does the job for one credential
# expects the credential (string) and an optional message (e.g. hrn) for reporting