X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-jsonrpclib.git/blobdiff_plain/669c1369c82b5dec6fd7952dce27a41ac1690b11..1cb797f048ae5131a01086a93d87952c03e8abe7:/jsonrpclib/config.py?ds=sidebyside diff --git a/jsonrpclib/config.py b/jsonrpclib/config.py index 1f9d7d8..4d28f1b 100644 --- a/jsonrpclib/config.py +++ b/jsonrpclib/config.py @@ -29,5 +29,10 @@ class Config(object): user_agent = 'jsonrpclib/0.1 (Python %s)' % \ '.'.join([str(ver) for ver in sys.version_info[0:3]]) # User agent to use for calls. - -config = Config + _instance = None + + @classmethod + def instance(cls): + if not cls._instance: + cls._instance = cls() + return cls._instance