mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
fix pkgres on older python3 versions
This commit is contained in:
parent
5df2cbe5d7
commit
c17ce4892e
|
@ -4200,8 +4200,6 @@ def load_resource(E: EnvParams, name: str, mode="rb") -> IO[bytes]:
|
||||||
ap = os.path.join(E.mod, name)
|
ap = os.path.join(E.mod, name)
|
||||||
|
|
||||||
if PY2:
|
if PY2:
|
||||||
import codecs
|
|
||||||
|
|
||||||
return codecs.open(ap, "r", encoding=enc) # type: ignore
|
return codecs.open(ap, "r", encoding=enc) # type: ignore
|
||||||
|
|
||||||
return open(ap, mode, encoding=enc)
|
return open(ap, mode, encoding=enc)
|
||||||
|
|
Loading…
Reference in a new issue