diff options
author | emkael <emkael@tlen.pl> | 2024-01-24 02:02:46 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2024-01-24 02:02:46 +0100 |
commit | ba6aee632254da250b5f93d13405ae6aeacde922 (patch) | |
tree | 8111aee9aee0801c587359d4320e2c5fb030f2ba | |
parent | adb385515ea439bb01dc0af4619251ec78b25413 (diff) |
Resetting SQD object values each time their read from file
-rw-r--r-- | squaredeal/sqd.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/squaredeal/sqd.py b/squaredeal/sqd.py index d80c3e0..3de3f34 100644 --- a/squaredeal/sqd.py +++ b/squaredeal/sqd.py @@ -57,6 +57,9 @@ class SQDPhase(object): class SQD(object): def __init__(self): + self._init_values() + + def _init_values(self): self.name = '' self.delayed_info = '' self.delayed_value = '' @@ -68,6 +71,7 @@ class SQD(object): def fromfile(self, sqdpath, sqkpath=None, encoding='utf-8'): with open(sqdpath, encoding=encoding) as sqdfile: contents = [line.strip() for line in sqdfile.readlines()] + self._init_values() for idx, line in enumerate(contents): if line.startswith('#'): continue |