Commit 45e0a50c authored by Michal Čihař's avatar Michal Čihař

Use six to detect string types

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 6399856e
......@@ -41,6 +41,7 @@ import weblate
import subprocess
import os.path
import re
import six
import csv
import traceback
import importlib
......@@ -431,7 +432,7 @@ class FileFormat(object):
Loads file using defined loader.
'''
# Add missing mode attribute to Django file wrapper
if (not isinstance(storefile, basestring) and
if (not isinstance(storefile, six.string_types) and
not hasattr(storefile, 'mode')):
storefile.mode = 'r'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment