this is a patch my friend sent me:
Index: 0.12/nevernotifyupdaterplugin/api.py
===================================================================
--- 0.12/nevernotifyupdaterplugin/api.py (revision 10321)
+++ 0.12/nevernotifyupdaterplugin/api.py (working copy)
@@ -28,20 +28,21 @@
domain = ''
if defaultDomain: domain = '@'+defaultDomain
- cursor = self.db.cursor()
- # Suppress the updater from the recipients
- updater = None
- up_em = None
- cursor.execute("SELECT author FROM ticket_change WHERE ticket=%s "
- "ORDER BY time DESC LIMIT 1", (tktid,))
- for updater, in cursor: break
- else:
- cursor.execute("SELECT reporter FROM ticket WHERE id=%s",
- (tktid,))
- for updater, in cursor: break
+ with self.env.db_query as db:
+ cursor = db.cursor()
+ # Suppress the updater from the recipients
+ updater = None
+ up_em = None
+ cursor.execute("SELECT author FROM ticket_change WHERE ticket=%s "
+ "ORDER BY time DESC LIMIT 1", (tktid,))
+ for updater, in cursor: break
+ else:
+ cursor.execute("SELECT reporter FROM ticket WHERE id=%s",
+ (tktid,))
+ for updater, in cursor: break
- cursor.execute("SELECT value FROM session_attribute WHERE name='email' and sid=%s;",(updater,))
- for up_em, in cursor: break
+ cursor.execute("SELECT value FROM session_attribute WHERE name='email' and sid=%s;",(updater,))
+ for up_em, in cursor: break
def finder(r):
if not r: