E5XML/TasksReader.py

changeset 592
3ad07054e658
parent 590
beb60b9b3d8d
child 791
9ec2ac20e54e
--- a/E5XML/TasksReader.py	Sun Sep 12 11:58:19 2010 +0200
+++ b/E5XML/TasksReader.py	Sun Sep 12 12:02:39 2010 +0200
@@ -74,20 +74,8 @@
                 "description" : "",
                }
         task["priority"] = int(self.attribute("priority", "1"))
-        
-        val = self.attribute("completed", "False")
-        if val in ["True", "False"]:
-            val = (val == "True")
-        else:
-            val = bool(int(val))
-        task["completed"] = val
-        
-        val = self.attribute("bugfix", "False")
-        if val in ["True", "False"]:
-            val = (val == "True")
-        else:
-            val = bool(int(val))
-        task["bugfix"] = val
+        task["completed"] = self.toBool(self.attribute("completed", "False"))
+        task["bugfix"] = self.toBool(self.attribute("bugfix", "False"))
         
         while not self.atEnd():
             self.readNext()

eric ide

mercurial