Opened 5 years ago

Closed 5 years ago

#10040 closed defect (fixed)

Error with interpolation in keys

Reported by: Étienne BERSAC Owned by: Jun Omae
Priority: normal Component: TracWorkflowAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11



When using WorkflowAdmin with interpolation in some config key, i git the following exception :

File "/usr/lib/python2.6/dist-packages/trac/web/", line 511, in _dispatch_request
File "/usr/lib/python2.6/dist-packages/trac/web/", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.6/dist-packages/trac/admin/", line 116, in process_request
File "/usr/local/lib/python2.6/dist-packages/tracworkflowadmin/", line 127, in render_admin_panel
  'text': self._conf_to_str(self.config)
File "/usr/local/lib/python2.6/dist-packages/tracworkflowadmin/", line 211, in _conf_to_str
  tmp.set('ticket-workflow', name.encode('utf-8'), value.encode('utf-8'))
File "/usr/lib/python2.6/", line 669, in set
  "position %d" % (value, percent_index))
ValueError: invalid interpolation syntax in 'Le ticket %s \xc3\xa0 \xc3\xa9t\xc3\xa9 marqu\xc3\xa9e comme doublon de ce ticket.' at position 10

plugin version is (from SVN).

The plugin should use raw value when reading workflow configuration.

Regards, Étienne BERSAC

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by Jun Omae

Thanks for your reporting.

Ok. I can reproduce the issue with Python 2.6, but cannot with Python 2.4. I'll work the issue later.

comment:2 Changed 5 years ago by Jun Omae

Resolution: fixed
Status: newclosed

(In [11594]) tracworkflowadmin: fixed #10040, error while interpolation

Uses ConfigParser() instead of SafeConfigParser(). The ConfigParser() is used in trac/

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
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.