Use deepcopy in var_stack.push
Change-Id: I4249b00297e908d1e0dc84f298671a08291d9bc5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/var_stack.py b/lib/var_stack.py
index 9fc4e41..5bb56a7 100644
--- a/lib/var_stack.py
+++ b/lib/var_stack.py
@@ -6,6 +6,7 @@
import sys
import collections
+import copy
try:
from robot.utils import DotDict
@@ -128,7 +129,7 @@
if var_name in self.__stack_dict:
self.__stack_dict[var_name].append(var_value)
else:
- self.__stack_dict[var_name] = [var_value]
+ self.__stack_dict[var_name] = copy.deepcopy([var_value])
def pop(self,
var_name=""):