Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix importing of nested modules.

  • Loading branch information...
commit 865a813078c1b447713aeb1f1bb860c441a88365 1 parent e3a3cde
@jsalz jsalz authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 jsonrpclib/
7 jsonrpclib/
@@ -129,6 +129,13 @@ def load(obj):
except ImportError:
raise TranslationError('Could not import %s from module %s.' %
(json_class_name, json_module_tree))
+ # The returned class is the top-level module, not the one we really
+ # want. (E.g., if we import a.b.c, we now have a.) Walk through other
+ # path components to get to b and c.
+ for i in json_module_parts[1:]:
+ temp_module = getattr(temp_module, i)
json_class = getattr(temp_module, json_class_name)
# Creating the object...
new_obj = None
Please sign in to comment.
Something went wrong with that request. Please try again.