ignore TypeErrors while checking for rpcmethods. #31

Merged
merged 1 commit into from Jan 7, 2014

Projects

None yet

4 participants

hnrd commented Dec 19, 2013

If an app uses unicode_literals from __future__ and has
strings in its __init__ import fails.

i.e. django-debug-toolbar

Christoph Gebhardt ignore TypeErrors while checking for rpcmethods.
If an app uses unicode_literals from __future__ and has
strings in its __init__ import fails.

i.e. django-debug-toolbar.
c64766f
@davidfischer davidfischer merged commit 643e63e into rpc4django:master Jan 7, 2014

1 check passed

default The Travis CI build passed
Details
Owner

Looks good to me. Any idea why unicode_literals does that? Is there another workaround?

tinnet commented Feb 17, 2014

i don't quite understand the problem, but the fix works beautifully, are you planning a pypi release?

You can replace __import__ with the following and it will deal with unicode issue.

import importlib
importlib.import_module(name, package=None)

More info here: https://docs.python.org/2/library/importlib.html#importlib.import_module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment