fix: replace mutable argument (a list) in StateMachine constructor
This commit is contained in:
parent
2c26fb0d76
commit
a9f2e1482c
3
sleekxmpp/thirdparty/statemachine.py
vendored
3
sleekxmpp/thirdparty/statemachine.py
vendored
@ -15,7 +15,8 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class StateMachine(object):
|
class StateMachine(object):
|
||||||
|
|
||||||
def __init__(self, states=[]):
|
def __init__(self, states=None):
|
||||||
|
if not states: states = []
|
||||||
self.lock = threading.Condition()
|
self.lock = threading.Condition()
|
||||||
self.__states = []
|
self.__states = []
|
||||||
self.addStates(states)
|
self.addStates(states)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user