« The Venture Capital Squeeze | Main | Mozilla Firefox 1.5RC3 has been released »

TracNav with Trac

Every now and again I get to play with some python script which has some obscure error code which requires fixing. So I've fixed my issues with the TracNav wiki macro for Trac:

--- TracNav.py?rev=3044&format=txt      Tue Nov  1 13:56:03 2005
+++ TracNav.py  Mon Nov 14 21:45:44 2005
@@ -80,7 +80,7 @@
         tocText = hdf.getValue('wiki.page_source', tocText);
     else:
         cursor = db.cursor()
-        cursor.execute('SELECT text FROM wiki WHERE name=%s ORDER BY version DESC LIMIT 1', name)
+        cursor.execute('SELECT text FROM wiki WHERE name=%s ORDER BY version DESC LIMIT 1', (name, ))
         row = cursor.fetchone()
         if row:
             tocText = row[0]

Feel free to grab the patch in unified diff format.



TrackBack

TrackBack URL for this entry:
http://www.powertrip.co.za/blog/mt-tb.cgi/476

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)