Opened 13 years ago

Closed 13 years ago

#16200 closed Bug (fixed)

__init__ of TemplateIfParser has return statement

Reported by: Dmitry Trofimov Owned by: nobody
Component: Template system Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description


Attachments (1)

return-removed.patch (585 bytes ) - added by Dmitry Trofimov 13 years ago.

Download all attachments as: .zip

Change History (5)

by Dmitry Trofimov, 13 years ago

Attachment: return-removed.patch added

comment:1 by Dmitry Trofimov, 13 years ago

Has patch: set

comment:2 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

This return statement was harmless because super(...) returned None anyvway.

But it's better to remove it, since __init__ is not allowed to return a value <http://docs.python.org/reference/datamodel.html#object.__init__>.

comment:3 by Aymeric Augustin, 13 years ago

Triage Stage: AcceptedReady for checkin

The patch is all right, except for the fact that it contains \r\n end-of-lines. It's still possible to apply it as-is.

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [16410]:

Fixed #16200 -- Stopped TemplateIfParser from returning something in __init__. Thanks, traff.

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