You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/08/27 00:55:00 UTC

[45/50] [abbrv] tinkerpop git commit: removed exception handling around side_effect.keys() when there are no side_effects.

removed exception handling around side_effect.keys() when there are no side_effects.


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

Branch: refs/heads/master
Commit: 5da8a30f7ae872db5ff029b9195f298bf71d91db
Parents: a0bd413
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Aug 26 14:28:48 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Aug 26 14:28:48 2016 -0600

----------------------------------------------------------------------
 .../jython/gremlin_python/driver/driver_remote_connection.py    | 5 +----
 .../main/jython/tests/driver/test_driver_remote_connection.py   | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5da8a30f/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
index fa61fb5..7aca638 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
@@ -87,10 +87,7 @@ class DriverRemoteConnection(RemoteConnection):
                 }
             }
         }
-        try:
-            keys = yield self._execute_message(message)
-        except:
-            keys = []
+        keys = yield self._execute_message(message)
         raise gen.Return(set(keys))
 
     @gen.coroutine

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5da8a30f/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
index 90a4ef6..72247c4 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
@@ -103,6 +103,11 @@ class TestDriverRemoteConnection(TestCase):
         assert "ripple" in n.keys()
         assert 3 == n["lop"]
         assert 1 == n["ripple"]
+        try:
+            x = t.side_effects["x"]
+            raise Exception("Accessing a non-existent key should throw an error")
+        except KeyError:
+            pass
 
 
 if __name__ == '__main__':