summaryrefslogtreecommitdiff
path: root/squaredeal/sqd.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2024-02-13 01:26:08 +0100
committeremkael <emkael@tlen.pl>2024-02-13 01:26:08 +0100
commit3c44a072bd3833c34fa6c15553cce0594247aa9d (patch)
tree9c18a0bc9d0f65d25163d0912d7d05eda9941b31 /squaredeal/sqd.py
parent9e487aae490aca64f89634ad608729e4094d8847 (diff)
Input file encoding option back functioning
Diffstat (limited to 'squaredeal/sqd.py')
-rw-r--r--squaredeal/sqd.py4
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()