Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 656508 - Remove multiple imports of jsobject. r=hskupin

  • Loading branch information...
commit 6d677f0c80970f25b3e3fd8fd7e5816b28d61a07 1 parent 9305cdc
@berkerpeksag berkerpeksag authored whimboo committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 jsbridge/jsbridge/network.py
View
6 jsbridge/jsbridge/network.py
@@ -17,6 +17,8 @@
import simplejson
from simplejson.encoder import encode_basestring_ascii, encode_basestring
+import jsobjects
+
class JavaScriptException(Exception):
pass
@@ -68,8 +70,6 @@ def handle_read(self):
class JSObjectEncoder(simplejson.JSONEncoder):
"""Encoder that supports jsobject references by name."""
def encode(self, o):
- import jsobjects
-
if isinstance(o, jsobjects.JSObject):
return o._name_
else:
@@ -77,8 +77,6 @@ def encode(self, o):
def _iterencode(self, o, markers=None):
# XXX verbosely copied from simplejson
- import jsobjects
-
if isinstance(o, jsobjects.JSObject):
yield o._name_
elif isinstance(o, basestring):
Please sign in to comment.
Something went wrong with that request. Please try again.