From: BenoƮt Fontaine Date: Mon, 7 Jan 2019 09:20:03 +0000 (+0100) Subject: Fix Notes: set the text attribute before adding to Tree X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=0a0a1035f9f4c4a985069f2a914851e630e84b50;p=gamesguru%2Fgetmyancestors.git Fix Notes: set the text attribute before adding to Tree --- diff --git a/getmyancestors.py b/getmyancestors.py index 244ac79..092e8dc 100755 --- a/getmyancestors.py +++ b/getmyancestors.py @@ -250,11 +250,11 @@ class Note: else: Note.counter += 1 self.num = Note.counter + self.text = text.strip() + if tree: tree.notes.append(self) - self.text = text.strip() - def print(self, file=sys.stdout): file.write(cont('0 @N' + str(self.num) + '@ NOTE ' + self.text) + '\n')