From d265695ceeab3229e5dfe0702ac4c7d6a991be64 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 31 Aug 2025 22:53:45 -0500 Subject: [PATCH] fix: fix 'unspecified-encoding' for pylint --- .pylintrc | 1 - src/wuttaweb/views/upgrades.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pylintrc b/.pylintrc index 3101825..f30402b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -38,4 +38,3 @@ disable=fixme, unnecessary-comprehension, unnecessary-lambda, unnecessary-lambda-assignment, - unspecified-encoding, diff --git a/src/wuttaweb/views/upgrades.py b/src/wuttaweb/views/upgrades.py index 03c23ae..bc4e29c 100644 --- a/src/wuttaweb/views/upgrades.py +++ b/src/wuttaweb/views/upgrades.py @@ -323,7 +323,7 @@ class UpgradeView(MasterView): size = os.path.getsize(path) - offset if size > 0: # with open(path, 'rb') as f: - with open(path) as f: + with open(path, "rt", encoding="utf_8") as f: f.seek(offset) chunk = f.read(size) # data['stdout'] = chunk.decode('utf8').replace('\n', '
')