Modify

Opened 10 years ago

Closed 10 years ago

#12101 closed defect (fixed)

Not compatible with Trac 1.1.2

Reported by: vaclav.cejka@… Owned by: Geert
Priority: normal Component: WantedPagesMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

Because get_db_cnx is no longer supported on Trac 1.1.2 (see ​http://trac.edgewall.org/wiki/TracDev/DatabaseApi), macro does not work on Trac 1.1.2.

Attachments (1)

macro.py (9.4 KB) - added by vaclav.cejka@… 10 years ago.
Updated macro

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by vaclav.cejka@…

I have created a patch, updated macro is attached. Please check it, I'm not much used to Python.

Changed 10 years ago by vaclav.cejka@…

Attachment: macro.py added

Updated macro

comment:2 Changed 10 years ago by Ryan J Ollos

There are some minor improvements that could be made:

  • Use db_query rather than db_transaction since only a read-only connection is needed.
  • It's not necessary to call cursor.close and probably not even necessary to work directly with a cursor.

Also, for the future please take a look at the documentation on how to create a patch: trac:TracDev/SubmittingPatches.

comment:3 Changed 10 years ago by Geert

Resolution: fixed
Status: newclosed

This was fixed in changeset r14409.

The macro now uses try/except to find out which call to use.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Geert.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.