diff --git a/pyproject.toml b/pyproject.toml index 45b1f34..e932e71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ select = [ "RUF100", # unused noqa (yesqa) "UP", # pyupgrade ] +ignore = ["UP015"] [tool.zest.releaser] create-wheel = true diff --git a/tzlocal/unix.py b/tzlocal/unix.py index 4183d4a..117c18d 100644 --- a/tzlocal/unix.py +++ b/tzlocal/unix.py @@ -94,7 +94,7 @@ def _get_localzone_name(_root="/"): for filename in ("etc/sysconfig/clock", "etc/conf.d/clock"): tzpath = os.path.join(_root, filename) try: - with open(tzpath) as tzfile: + with open(tzpath, "rt") as tzfile: data = tzfile.readlines() log.debug(f"{tzpath} found, contents:\n {data}")