summaryrefslogtreecommitdiff
path: root/jsonrpclib/config.py
diff options
context:
space:
mode:
authorJoshua Marshall <catchjosh@gmail.com>2015-10-05 16:55:23 -0700
committerJoshua Marshall <catchjosh@gmail.com>2015-10-05 16:55:23 -0700
commite0fb40fb55adffefe1bc62e0b936a78e7071989f (patch)
tree07ae7076ce4d4adac72902b715e9c1bec1260d43 /jsonrpclib/config.py
parentb59217c971603a30648b041c84f85159afb2ec31 (diff)
downloadjsonrpclib-e0fb40fb55adffefe1bc62e0b936a78e7071989f.tar.gz
Initial travis integration, cleanups for running tests.
Diffstat (limited to 'jsonrpclib/config.py')
-rw-r--r--jsonrpclib/config.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/jsonrpclib/config.py b/jsonrpclib/config.py
index 4d28f1b..ca926ca 100644
--- a/jsonrpclib/config.py
+++ b/jsonrpclib/config.py
@@ -1,12 +1,14 @@
import sys
+
class LocalClasses(dict):
def add(self, cls):
self[cls.__name__] = cls
+
class Config(object):
"""
- This is pretty much used exclusively for the 'jsonclass'
+ This is pretty much used exclusively for the 'jsonclass'
functionality... set use_jsonclass to False to turn it off.
You can change serialize_method and ignore_attribute, or use
the local_classes.add(class) to include "local" classes.
@@ -15,7 +17,7 @@ class Config(object):
# Change to False to keep __jsonclass__ entries raw.
serialize_method = '_serialize'
# The serialize_method should be a string that references the
- # method on a custom class object which is responsible for
+ # method on a custom class object which is responsible for
# returning a tuple of the constructor arguments and a dict of
# attributes.
ignore_attribute = '_ignore'
@@ -30,7 +32,7 @@ class Config(object):
'.'.join([str(ver) for ver in sys.version_info[0:3]])
# User agent to use for calls.
_instance = None
-
+
@classmethod
def instance(cls):
if not cls._instance: