Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11698 closed defect (fixed)

AttributeError: 'FakeRequest' object has no attribute 'authname'

Reported by: hasienda Owned by: hasienda
Priority: normal Component: TracHacksPlugin
Severity: normal Keywords: request Mock
Cc: otaku42 Trac Release:


This was reported on 10-Apr-2014 by Paul Tobias via th-users mailing list, but appeared with rather big delay only today. It was rather easy to track it down to the new tag change recording, that requires evaluation of req.authname, which is not take care for in trachacks.util.FakeRequest.

The trivial fix - including excessive white-space cleanup - is straight-forward:

  • trachacksplugin/0.11/trachacks/

    diff --git a/trachacksplugin/0.11/trachacks/ b/trachacksplugin/0.11/trachacks/
    a b  
    1515class FakeRequest(object):
    16     def __init__(self, env, authname = 'anonymous'):
     16    def __init__(self, env, authname='anonymous'):
     17        self.authname = authname
    1718        self.perm = PermissionCache(env, authname)

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by rjollos

In 13876:

Fixed an AttributeError exception in TracHacksHtPasswdStore.save_changes (IAccountChangeListener implementation) due to missing authname attribute of FakeRequest class. Refs #11698.

TagsPlugin 0.7 requires an authname attribute on the Request object in order to record the tags change history. Bumped TracTags requirement from 0.7dev to 0.7.

Patch by Steffen Hoffmann.

comment:2 Changed 3 years ago by rjollos

In 13877:

3.0dev: PEP-0008 changes. Refs #11698.

comment:3 Changed 3 years ago by rjollos

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

comment:4 Changed 3 years ago by rjollos

  • Owner changed from rjollos to hasienda

Add Comment

Modify Ticket

as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.