Commit 150de840 authored by Tristan Cavelier's avatar Tristan Cavelier

xxx workaround 5 part

parent 6892d346
......@@ -112,12 +112,20 @@ class OOoServerProxy(ServerProxy):
transport = TimeoutTransport(timeout=timeout, scheme=scheme)
#ServerProxy.__init__(self, uri, allow_none=True, transport=transport)
from xmlrpclib import SafeTransport
import ssl
host = "[2001:67c:1254:9c::e1f]:8000" # cloudooo3 - CloudoooTest
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) # allow invalid/autosigned certs
ssl_context.verify_mode = ssl.CERT_NONE
ServerProxy.__init__(self, "https://" + host, allow_none=True, transport=SafeTransport(context=ssl_context))
uri = getattr(preference_tool, "getPreferredDocumentConversionServerUrl", str)()
#uri = "https://[2001:67c:1254:9c::e1f]:8000" # cloudooo3 - CloudoooTest
if uri.startswith("https://"):
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) # allow invalid/autosigned certs
ssl_context.verify_mode = ssl.CERT_NONE
ServerProxy.__init__(self, uri, allow_none=True, transport=SafeTransport(context=ssl_context))
elif uri.startswith("http://"):
ServerProxy.__init__(self, uri, allow_none=True)
else:
raise ConversionError('OOoDocument: cannot proceed with conversion:'
' preferred conversion server url is invalid')
def __getattr__(self, attr):
obj = ServerProxy.__getattr__(self, attr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment