Modify

Opened 2 years ago

Closed 2 years ago

#10040 closed defect (fixed)

Error with interpolation in keys

Reported by: ebersac@… Owned by: jun66j5
Priority: normal Component: TracWorkflowAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Hi,

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

File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 511, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.6/dist-packages/trac/admin/web_ui.py", line 116, in process_request
  path_info)
File "/usr/local/lib/python2.6/dist-packages/tracworkflowadmin/web_ui.py", line 127, in render_admin_panel
  'text': self._conf_to_str(self.config)
File "/usr/local/lib/python2.6/dist-packages/tracworkflowadmin/web_ui.py", line 211, in _conf_to_str
  tmp.set('ticket-workflow', name.encode('utf-8'), value.encode('utf-8'))
File "/usr/lib/python2.6/ConfigParser.py", 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 0.12.0.2 (from SVN).

The plugin should use raw value when reading workflow configuration.

Regards,
Étienne BERSAC

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by jun66j5

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 2 years ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

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

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.