con't crash on loading old timers without the "disabled" attribute
authorAxel Buehning <axel.buehning@multimedia-labs.de>
Thu, 26 Jan 2006 15:32:30 +0000 (15:32 +0000)
committerAxel Buehning <axel.buehning@multimedia-labs.de>
Thu, 26 Jan 2006 15:32:30 +0000 (15:32 +0000)
RecordTimer.py

index e047075..19ec9db 100644 (file)
@@ -183,7 +183,10 @@ def createTimer(xml):
        serviceref = ServiceReference(str(xml.getAttribute("serviceref")))
        description = xml.getAttribute("description").encode("utf-8")
        repeated = xml.getAttribute("repeated").encode("utf-8")
        serviceref = ServiceReference(str(xml.getAttribute("serviceref")))
        description = xml.getAttribute("description").encode("utf-8")
        repeated = xml.getAttribute("repeated").encode("utf-8")
-       disabled = eval(xml.getAttribute("disabled"))
+       try:
+               disabled = eval(xml.getAttribute("disabled"))
+       except:
+               disabled = False
        try:
                eit = long(xml.getAttribute("eit").encode("utf-8"))
        except:
        try:
                eit = long(xml.getAttribute("eit").encode("utf-8"))
        except: