fix: replace mutable argument (a list) in StateMachine constructor

This commit is contained in:
Jean-Philippe Caruana 2013-07-26 13:05:25 +02:00
parent 2c26fb0d76
commit a9f2e1482c

View file

@ -15,7 +15,8 @@ log = logging.getLogger(__name__)
class StateMachine(object):
def __init__(self, states=[]):
def __init__(self, states=None):
if not states: states = []
self.lock = threading.Condition()
self.__states = []
self.addStates(states)