eric6/E5XML/TasksReader.py

changeset 8280
17d03699f151
parent 8278
e647b71b393f
child 8665
1600bcd3a378
--- a/eric6/E5XML/TasksReader.py	Sun May 02 10:59:00 2021 +0200
+++ b/eric6/E5XML/TasksReader.py	Sun May 02 15:09:14 2021 +0200
@@ -15,7 +15,7 @@
 from .Config import tasksFileFormatVersion
 from .XMLStreamReaderBase import XMLStreamReaderBase
 
-from Tasks.Task import TaskType
+from Tasks.Task import TaskType, TaskPriority
 
 import Utilities
 
@@ -80,7 +80,7 @@
         Private method to read the task info.
         """
         task = {"summary": "",
-                "priority": 1,
+                "priority": TaskPriority.NORMAL,
                 "completed": False,
                 "created": 0,
                 "filename": "",
@@ -89,7 +89,9 @@
                 "description": "",
                 "uid": "",
                 }
-        task["priority"] = int(self.attribute("priority", "1"))
+        task["priority"] = TaskPriority(
+            int(self.attribute("priority", str(TaskPriority.NORMAL.value)))
+        )
         task["completed"] = self.toBool(self.attribute("completed", "False"))
         if self.version in ["4.2", "5.0"]:
             isBugfix = self.toBool(self.attribute("bugfix", "False"))

eric ide

mercurial