From 3c44a072bd3833c34fa6c15553cce0594247aa9d Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 13 Feb 2024 01:26:08 +0100 Subject: Input file encoding option back functioning --- squaredeal/sqd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'squaredeal/sqd.py') diff --git a/squaredeal/sqd.py b/squaredeal/sqd.py index 3de3f34..60ef4a3 100644 --- a/squaredeal/sqd.py +++ b/squaredeal/sqd.py @@ -68,7 +68,9 @@ class SQD(object): self.published = False self.sqd_path = None - def fromfile(self, sqdpath, sqkpath=None, encoding='utf-8'): + def fromfile(self, sqdpath, sqkpath=None, encoding=None): + if not encoding: + encoding = 'utf-8' with open(sqdpath, encoding=encoding) as sqdfile: contents = [line.strip() for line in sqdfile.readlines()] self._init_values() -- cgit v1.2.3