Opened 4 years ago

Closed 4 years ago

#1945 closed bug (Fixed)

Mutable default argument in deluge.ui.client.DaemonSSLProxy.__init__

Reported by: Simon Owned by: Cas
Priority: trivial Milestone: 2.0.x
Component: GTK-UI Version: master (git)
Keywords: Cc:



When looking at the source code I saw that DaemonSSLProxy.init have a mutable default parameter value:

This may be the source of bugs as explained here:

It may be intentional, but I am not sure as I am not familiar with the code. If it is intentional, a comment should be added to say so. Otherwise, the method should be changed to look like this:

    def __init__(self, event_handlers=None):
        if event_handlers is None:
            event_handlers = {}

Change History (3)

comment:1 Changed 4 years ago by Cas

  • Milestone changed from Future to 1.3.4
  • Owner set to Cas
  • Status changed from new to accepted

comment:2 Changed 4 years ago by Cas

  • Milestone changed from 1.3.4 to 1.4.0

Fix committed to 1.3-stable: 3a0b6f8

comment:3 Changed 4 years ago by Cas

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

Fix committed to master: 2a3d8ae

Note: See TracTickets for help on using tickets.