diff options
author | emkael <emkael@tlen.pl> | 2024-02-13 01:26:08 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2024-02-13 01:26:08 +0100 |
commit | 3c44a072bd3833c34fa6c15553cce0594247aa9d (patch) | |
tree | 9c18a0bc9d0f65d25163d0912d7d05eda9941b31 /squaredeal/sqd.py | |
parent | 9e487aae490aca64f89634ad608729e4094d8847 (diff) |
Input file encoding option back functioning
Diffstat (limited to 'squaredeal/sqd.py')
-rw-r--r-- | squaredeal/sqd.py | 4 |
1 files changed, 3 insertions, 1 deletions
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() |