Modify

Opened 13 years ago

Closed 12 years ago

#8632 closed defect (fixed)

tiny error in 0.11/tracdiscussion/tags.py

Reported by: a.kean@… Owned by: Radek Bartoň
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Source:  discussionplugin-r9972.zip, 0.11
Running on 2.6.31-23-server #74-Ubuntu SMP Mon Feb 28 22:32:34 UTC 2011 x86_64 GNU/Linux
Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) 
trac Version: 0.11.5-2ubuntu1

there's a tiny error in 0.11/tracdiscussion/tags.py - line 121: method _delete_tags of DiscussionTags class:

variable new_tags is not defined, python complains about undefined global variable new_tags

120     def _delete_tags(self, req, resource):
121         self.log.debug("deleting tags: %s" % (new_tags,))  <--
122 
123         # Delete tags of the resource.
124         tag_system = TagSystem(self.env)
125         tag_system.delete_tags(req, resource)

Yes, commenting out the log bypasses this, but just so that you know. Thanks for a great plugin.

Attachments (0)

Change History (4)

comment:1 in reply to:  description Changed 13 years ago by anonymous

Forgot to format it - for readability, here it is again

Replying to a.kean@auckland.ac.nz:

> 
> Source:  discussionplugin-r9972.zip, 0.11
> Running on 2.6.31-23-server #74-Ubuntu SMP Mon Feb 28 22:32:34 UTC 2011 x86_64 GNU/Linux
> Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) 
> trac Version: 0.11.5-2ubuntu1
> 
> there's a tiny error in 0.11/tracdiscussion/tags.py - line 121:
> method _delete_tags of DiscussionTags class:
> 
> variable new_tags is not defined,
> python complains about undefined global variable new_tags
> 
     def _delete_tags(self, req, resource):
         self.log.debug("deleting tags: %s" % (new_tags,))  <--
 
         # Delete tags of the resource.
         tag_system = TagSystem(self.env)
         tag_system.delete_tags(req, resource)

> 
> Yes, commenting out the log bypasses this, but just so that you know.
> Thanks for a great plugin.

comment:2 Changed 13 years ago by Radek Bartoň

Status: newassigned

Sure. Thank you for reporting. The tags support is in unfinished state right now. Better not to use this revision.

comment:3 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

comment:4 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [12054]) Fixes #8632: Fixed exception when deleting a forum due to use of uninitialized variable. Thanks to a.kean@… for the report.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
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.