Skip to content
Snippets Groups Projects
Commit c29e35fe authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rpc: Work around epydoc warning


Aliasing the “threading” module allows us to avoid the “No information
available for ganeti.rpc._RpcThreadLocal's base threading.local” warning
by epydoc.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 4412f2ae
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,12 @@ def _ConfigRpcCurl(curl):
curl.setopt(pycurl.CONNECTTIMEOUT, _RPC_CONNECT_TIMEOUT)
class _RpcThreadLocal(threading.local):
# Aliasing this module avoids the following warning by epydoc: "Warning: No
# information available for ganeti.rpc._RpcThreadLocal's base threading.local"
_threading = threading
class _RpcThreadLocal(_threading.local):
def GetHttpClientPool(self):
"""Returns a per-thread HTTP client pool.
......@@ -135,6 +140,10 @@ class _RpcThreadLocal(threading.local):
return pool
# Remove module alias (see above)
del _threading
_thread_local = _RpcThreadLocal()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment