Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#6322 closed defect (fixed)

[Patch] Fails when there's no priority

Reported by: Al Nikolov Owned by: Xavier Pechoultres
Priority: normal Component: IcalViewPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


If priority is disabled by the admin, tickets have priority='--'. The plugin fails then witn KeyError: '--'

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Al Nikolov


Index: icalview/
--- icalview/        (revision 7247)
+++ icalview/        (working copy)
@@ -191,7 +192,10 @@
                     if "HTTPS" in os.getenv('SERVER_PROTOCOL') :
                         protocol = "https"
                 content.write("URL:%s://%s%s\r\n" % (protocol,os.getenv('SERVER_NAME'),get_resource_url(self.env,ticket,req.href)))
-                priority = priority_map[result['priority']]
+                try:
+                    priority = priority_map[result['priority']]
+                except:
+                   self.env.log.debug("unmapped priority %s" % result['priority'])
                 if priority != None:
                     content.write("PRIORITY;VALUE=%s:%d\r\n" % (result['priority'],priority))

comment:2 Changed 9 years ago by Michael Renzmann

Summary: Fails when there's no priority[Patch] Fails when there's no priority

comment:3 Changed 9 years ago by Xavier Pechoultres

Resolution: fixed
Status: newclosed

(In [7250]) fix #6322 : unmapped priority cause exception. Many thanks to clown for patching

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Xavier Pechoultres.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.