Skip to content

Commit 7d53566

Browse files
committed
Ensure __import__ uses str in Python 2.X
1 parent 4a35681 commit 7d53566

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)