fix pkgres on older python3 versions

This commit is contained in:
ed 2025-07-31 08:32:52 +00:00
parent 5df2cbe5d7
commit c17ce4892e

View file

@ -4200,8 +4200,6 @@ def load_resource(E: EnvParams, name: str, mode="rb") -> IO[bytes]:
ap = os.path.join(E.mod, name)
if PY2:
import codecs
return codecs.open(ap, "r", encoding=enc) # type: ignore
return open(ap, mode, encoding=enc)