summaryrefslogtreecommitdiff
path: root/squaredeal/sqd.py
diff options
context:
space:
mode:
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()