diff --git a/pysollib/util.py b/pysollib/util.py index bc577655..10965fd2 100644 --- a/pysollib/util.py +++ b/pysollib/util.py @@ -37,6 +37,8 @@ from pysollib.mfxutil import Image from pysollib.mygettext import _ from pysollib.settings import DATA_DIRS, TOOLKIT +import six + # ************************************************************************ # * constants # ************************************************************************ @@ -149,8 +151,8 @@ class DataLoader: def __findFile(self, func, filename, subdirs=None, do_raise=1): if subdirs is None: subdirs = ("",) - elif isinstance(subdirs, str): - subdirs = (subdirs,) + elif isinstance(subdirs, six.string_types): + subdirs = (str(subdirs),) for dir in subdirs: f = os.path.join(self.dir, dir, filename) f = os.path.normpath(f)