Opened 7 years ago

Closed 7 years ago

#10887 closed (fixed)


Reported by: lsaffre 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: UI/UX:


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 SmileyChris 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by SmileyChris

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin


comment:2 Changed 7 years ago by adrian

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

(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