mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-14 11:21:02 +00:00
Merge pull request #276 from cjmayo/python3_26
{python3_26} Python3: fix fileutil
This commit is contained in:
commit
5c9376cfe2
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ import fnmatch
|
|||
import tempfile
|
||||
import importlib
|
||||
from distutils.spawn import find_executable
|
||||
from builtins import str as str_text
|
||||
|
||||
from .decorators import memoized
|
||||
|
||||
|
|
@ -166,7 +167,7 @@ else:
|
|||
|
||||
def pathencode (path):
|
||||
"""Encode a path string with the platform file system encoding."""
|
||||
if isinstance(path, unicode) and not os.path.supports_unicode_filenames:
|
||||
if isinstance(path, str_text) and not os.path.supports_unicode_filenames:
|
||||
path = path.encode(FSCODING, "replace")
|
||||
return path
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue