72 "linenumber" : 0, |
72 "linenumber" : 0, |
73 "bugfix" : False, |
73 "bugfix" : False, |
74 "description" : "", |
74 "description" : "", |
75 } |
75 } |
76 task["priority"] = int(self.attribute("priority", "1")) |
76 task["priority"] = int(self.attribute("priority", "1")) |
77 |
77 task["completed"] = self.toBool(self.attribute("completed", "False")) |
78 val = self.attribute("completed", "False") |
78 task["bugfix"] = self.toBool(self.attribute("bugfix", "False")) |
79 if val in ["True", "False"]: |
|
80 val = (val == "True") |
|
81 else: |
|
82 val = bool(int(val)) |
|
83 task["completed"] = val |
|
84 |
|
85 val = self.attribute("bugfix", "False") |
|
86 if val in ["True", "False"]: |
|
87 val = (val == "True") |
|
88 else: |
|
89 val = bool(int(val)) |
|
90 task["bugfix"] = val |
|
91 |
79 |
92 while not self.atEnd(): |
80 while not self.atEnd(): |
93 self.readNext() |
81 self.readNext() |
94 if self.isEndElement() and self.name() == "Task": |
82 if self.isEndElement() and self.name() == "Task": |
95 self.viewer.addTask(task["summary"], priority = task["priority"], |
83 self.viewer.addTask(task["summary"], priority = task["priority"], |