From c29e35fec1dc12c36585e7af731bef56c93dcbd6 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Tue, 26 Oct 2010 15:02:01 +0200 Subject: [PATCH] rpc: Work around epydoc warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Michael Hanselmann Reviewed-by: René Nussbaumer --- lib/rpc.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/rpc.py b/lib/rpc.py index 0126642..dac81f2 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -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() -- 1.7.10.4