Fixed errors in anchor_state functions in lib/state.py
- Need to use "anchored_state = state.copy()" vs just
"stripped_state = state".
Change-Id: I2322714c2145f0dab3de5fd9ad5e4ea90be85a97
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/state.py b/lib/state.py
index 635f232..298d344 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -178,7 +178,7 @@
function.
"""
- anchored_state = state
+ anchored_state = state.copy()
for key, match_state_value in anchored_state.items():
anchored_state[key] = "^" + str(anchored_state[key]) + "$"
@@ -200,7 +200,7 @@
function.
"""
- stripped_state = state
+ stripped_state = state.copy()
for key, match_state_value in stripped_state.items():
stripped_state[key] = stripped_state[key].strip("^$")