Skip to content

Commit 752edcf

Browse files
author
Ryan P Kilby
committed
Merge pull request #41 from zenoamaro/fixes-unicode-imports
Ensure __import__ uses str in Python 2.X
2 parents 4a35681 + 7d53566 commit 752edcf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rest_framework_filters/filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
def _import_class(path):
1616
module_path, class_name = path.rsplit('.', 1)
17+
class_name = str(class_name) # Ensure not unicode on py2.x
1718
module = __import__(module_path, fromlist=[class_name], level=0)
1819
return getattr(module, class_name)
1920

0 commit comments

Comments
 (0)