X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/045dd6d9e8ad07c827331864823446fc4637733c..b13dfb92ab93b63c3feb238d27e8b5cd2a495fce:/lib/rpc.py diff --git a/lib/rpc.py b/lib/rpc.py index edcb9d7..69e692c 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -42,7 +42,8 @@ from ganeti import serializer from ganeti import constants from ganeti import errors -import ganeti.http.client +# pylint has a bug here, doesn't see this import +import ganeti.http.client # pylint: disable-msg=W0611 # Module level variable @@ -55,10 +56,12 @@ def Init(): Must be called before using any RPC function. """ - global _http_manager + global _http_manager # pylint: disable-msg=W0603 assert not _http_manager, "RPC module initialized more than once" + http.InitSsl() + _http_manager = http.client.HttpClientManager() @@ -68,7 +71,7 @@ def Shutdown(): Must be called before quitting the program. """ - global _http_manager + global _http_manager # pylint: disable-msg=W0603 if _http_manager: _http_manager.Shutdown() @@ -160,7 +163,7 @@ class RpcResult(object): args = (msg, prereq) else: args = (msg, ) - raise ec(*args) + raise ec(*args) # pylint: disable-msg=W0142 class Client: