Opened 11 years ago

Closed 10 years ago

#10887 closed (fixed)


Reported by: Luc Saffre Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In django/contrib/admin/, I suggest to change the following code:

        app_path = import_module(app).__path__
    except AttributeError:


    mod = import_module(app)
        app_path = mod.__path__
    except AttributeError:

Otherwise there is a probably not intended behaviour if one of my modules is buggy and raises itself an AttributeError.

Attachments (1)

10887.diff (635 bytes) - added by Chris Beaven 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Chris Beaven

Attachment: 10887.diff added

comment:1 Changed 10 years ago by Chris Beaven

Triage Stage: UnreviewedReady for checkin


comment:2 Changed 10 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [12192]) Fixed #10887 -- Fixed a possible gotcha in admin.autodiscover() by moving import_module() outside the try/except. Thanks, lsaffre

Note: See TracTickets for help on using tickets.
Back to Top