tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davebs...@apache.org
Subject [1/2] tinkerpop git commit: store defaults as classes
Date Fri, 11 Aug 2017 12:43:47 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/master d083c942b -> 4d1e12c5c


store defaults as classes


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/4d1e12c5
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/4d1e12c5
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/4d1e12c5

Branch: refs/heads/master
Commit: 4d1e12c5c36333c726447d1833e446f955474297
Parents: e9f03d5
Author: davebshow <davebshow@gmail.com>
Authored: Wed Aug 9 16:42:27 2017 -0400
Committer: davebshow <davebshow@gmail.com>
Committed: Fri Aug 11 08:41:51 2017 -0400

----------------------------------------------------------------------
 .../src/main/jython/gremlin_python/driver/serializer.py      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d1e12c5/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 679a7ce..007e162 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -89,8 +89,8 @@ class GraphSONMessageSerializer(object):
     """
 
     # KEEP TRACK OF CURRENT DEFAULTS
-    DEFAULT_READER = graphsonV3d0.GraphSONReader()
-    DEFAULT_WRITER = graphsonV3d0.GraphSONWriter()
+    DEFAULT_READER_CLASS = graphsonV3d0.GraphSONReader
+    DEFAULT_WRITER_CLASS = graphsonV3d0.GraphSONWriter
     DEFAULT_VERSION = b"application/vnd.gremlin-v3.0+json"
 
     def __init__(self, reader=None, writer=None, version=None):
@@ -98,10 +98,10 @@ class GraphSONMessageSerializer(object):
             version = self.DEFAULT_VERSION
         self._version = version
         if not reader:
-            reader = self.DEFAULT_READER
+            reader = self.DEFAULT_READER_CLASS()
         self._graphson_reader = reader
         if not writer:
-            writer = self.DEFAULT_WRITER
+            writer = self.DEFAULT_WRITER_CLASS()
         self.standard = Standard(writer)
         self.traversal = Traversal(writer)
 


Mime
View raw message