X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifoldapi%2Fmanifoldapi.py;h=796d0a52dfbe331ca7d03ed46da86267f82bcb48;hb=472832e915d739baf6950262c01d86effe0ae089;hp=c6eea10a094c423b6c5bad34236dd2499315d94c;hpb=e7bcf25f00fad54bd5ba41a946c53b091e4a0dff;p=unfold.git diff --git a/manifoldapi/manifoldapi.py b/manifoldapi/manifoldapi.py index c6eea10a..796d0a52 100644 --- a/manifoldapi/manifoldapi.py +++ b/manifoldapi/manifoldapi.py @@ -44,8 +44,10 @@ class ManifoldAPI: # Manifold uses a self signed certificate # https://www.python.org/dev/peps/pep-0476/ - context = ssl._create_unverified_context() - self.server = xmlrpclib.Server(self.url, verbose=False, allow_none=True, context=context) + if hasattr(ssl, '_create_unverified_context'): + self.server = xmlrpclib.Server(self.url, verbose=False, allow_none=True, context=ssl._create_unverified_context()) + else : + self.server = xmlrpclib.Server(self.url, verbose=False, allow_none=True) def __repr__ (self): return "ManifoldAPI[%s]"%self.url