Opened 11 years ago

Closed 11 years ago

#5031 closed (wontfix)

Replace Try/except block with pop method with default

Reported by: zigiDev@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Replace try/except block around pop call with a pop which provides a default (as to match the pop call in the penultimate else clause for this block). I'm pedantic. :)

Attachments (1)

kwargsPop.diff (931 bytes) - added by zigiDev@… 11 years ago.

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by zigiDev@…

Attachment: kwargsPop.diff added


comment:1 Changed 11 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed

If I may be pedantic right back... :-)

The problem with this patch is that this statement:

kwargs.pop(field.attname, field.get_default())

...causes field.get_default() to be executed in any case. We're avoiding that by doing another try/except.

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