Ensure frozen attribute is set in fsm clones/copies

Change-Id: Ic267eaeeda70046e37e6edeb296a956f32c82edf
This commit is contained in:
Joshua Harlow
2014-12-04 17:40:13 -08:00
parent a57c811922
commit 2f037360d6

View File

@@ -209,6 +209,7 @@ class FSM(object):
NOTE(harlowja): the copy will be left in an *uninitialized* state.
"""
c = FSM(self.start_state)
c.frozen = self.frozen
for state, data in six.iteritems(self._states):
copied_data = data.copy()
copied_data['reactions'] = copied_data['reactions'].copy()