Modify

Opened 3 years ago

Closed 19 months ago

#8632 closed defect (fixed)

tiny error in 0.11/tracdiscussion/tags.py

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

Description (last modified by rjollos)

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 3 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 3 years ago by Blackhex

  • Status changed from new to assigned

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

comment:3 Changed 3 years ago by rjollos

  • Description modified (diff)

comment:4 Changed 19 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Blackhex. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.