Skip to content

Commit

Permalink
Fixed incompatibility error with string types on older versions of Py…
Browse files Browse the repository at this point in the history
…thon.
  • Loading branch information
joeraz committed Jun 11, 2024
1 parent abd95b8 commit a189d42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pysollib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def __init__(self):
from pysollib.mygettext import _
from pysollib.settings import DATA_DIRS, TOOLKIT

import six

# ************************************************************************
# * constants
# ************************************************************************
Expand Down Expand Up @@ -149,8 +151,8 @@ def __init__(self, argv0, filenames, path=[]):
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)
Expand Down

0 comments on commit a189d42

Please sign in to comment.