Permalink
Browse files

Better connection finding for handlers.

  • Loading branch information...
1 parent 26ad073 commit fe0b2adb071e9a6f38cb433c0ac6d8c1ae4f10ca @gestiweb gestiweb committed Apr 6, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 bjsonrpc/handlers.py
View
@@ -64,10 +64,12 @@ def getcount(self): return c
# List of method names that never should be published
def __init__(self, connection):
- if hasattr(connection,"connection"):
- self._conn = connection.connection
- else:
- self._conn = connection
+ self._conn = connection
+
+ if hasattr(self._conn,"connection"):
+ self._conn = self._conn.connection
+ if hasattr(self._conn,"_conn"):
+ self._conn = self._conn._conn
self._methods = {}
for mname in dir(self):

0 comments on commit fe0b2ad

Please sign in to comment.