Modify ↓
Opened 2 years ago
Closed 21 months ago
#8909 closed enhancement (fixed)
needs updates for 0.13dev
| Reported by: | jayen | Owned by: | bobbysmith007 |
|---|---|---|---|
| Priority: | normal | Component: | NeverNotifyUpdaterPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.12 |
Description
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:
Attachments (0)
Change History (4)
comment:1 Changed 23 months ago by bobbysmith007
comment:2 follow-up: ↓ 3 Changed 23 months ago by bobbysmith007
- Resolution set to fixed
- Status changed from new to closed
I think i got it all applied correctly, please let me know if you have more troubles. I am still running trac12
comment:3 in reply to: ↑ 2 Changed 21 months ago by chung.bui.foss@…
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to bobbysmith007:
I think i got it all applied correctly, please let me know if you have more troubles. I am still running trac12
Dear bobbysmith007,
I think the latest revision of the plugin nevernotifyupdater contains an error in line 35, from "self" is not necessary. Please please revise and update patches
comment:4 Changed 21 months ago by bobbysmith007
- Resolution set to fixed
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.


sorry for the delayed response, I didnt see this ticket
Thanks for the patch, I will get it pushed up in a minute