Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14870 closed (fixed)

Do not catch all AttributeErrors in CustomRouter.allow_syncdb and friends

Reported by: Jonas H. Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Use hasattr instead.

Attachments (1)

router-hasattr.patch (2.2 KB ) - added by Jonas H. 14 years ago.

Download all attachments as: .zip

Change History (4)

by Jonas H., 14 years ago

Attachment: router-hasattr.patch added

comment:1 by Alex Gaynor, 14 years ago

Resolution: fixed
Status: newclosed

(In [14857]) Fixed #14870 -- don't catch AttributeErrors in database router methods, instead check that the method itself exists. Thanks to jonash for the patch.

comment:2 by Alex Gaynor, 14 years ago

(In [14858]) [1.2.X] Fixed #14870 -- don't catch AttributeErrors in database router methods, instead check that the method itself exists. Thanks to jonash for the patch. Backport of [14857].

comment:3 by Ramiro Morales, 14 years ago

(In [15201]) Enhanced tests for r14857 added in r15185. Refs #14870. Thanks Harm Geerts.

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