diff options
author | catchjosh <catchjosh@ae587032-bbab-11de-869a-473eb4776397> | 2010-09-04 21:44:53 +0000 |
---|---|---|
committer | catchjosh <catchjosh@ae587032-bbab-11de-869a-473eb4776397> | 2010-09-04 21:44:53 +0000 |
commit | 1cb797f048ae5131a01086a93d87952c03e8abe7 (patch) | |
tree | c72fa6cb0dc82a2d2d4940f1cb77e5fb92d4f5cd /jsonrpclib/config.py | |
parent | 9cb9396c901daeeb9bf47675bbce707671b5e6af (diff) | |
download | jsonrpclib-1cb797f048ae5131a01086a93d87952c03e8abe7.tar.gz |
Added unit tests, renamed to follow absolute importing guidelines, and made minor corrections introduced by unit tests.
git-svn-id: http://jsonrpclib.googlecode.com/svn/trunk@18 ae587032-bbab-11de-869a-473eb4776397
Diffstat (limited to 'jsonrpclib/config.py')
-rw-r--r-- | jsonrpclib/config.py | 9 |
1 files changed, 7 insertions, 2 deletions
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 |