mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fixed incompatibility error with string types on older versions of Python.
This commit is contained in:
parent
abd95b8887
commit
a189d42328
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue