##// END OF EJS Templates
Bug fixed in jrodata: Error working with more than one branch. When a value is updated in a branch this value is modified in every other branch because variables are references.
Miguel Valdez -
r757:c5bcb39af329
parent child
Show More
@@ -118,6 +118,19 class GenericData(object):
118 return copy.deepcopy(self)
118 return copy.deepcopy(self)
119
119
120 for key in inputObj.__dict__.keys():
120 for key in inputObj.__dict__.keys():
121
122 attribute = inputObj.__dict__[key]
123
124 #If this attribute is a tuple or list
125 if type(inputObj.__dict__[key]) in (tuple, list):
126 self.__dict__[key] = attribute[:]
127 continue
128
129 #If this attribute is another object or instance
130 if hasattr(attribute, '__dict__'):
131 self.__dict__[key] = attribute.copy()
132 continue
133
121 self.__dict__[key] = inputObj.__dict__[key]
134 self.__dict__[key] = inputObj.__dict__[key]
122
135
123 def deepcopy(self):
136 def deepcopy(self):
General Comments 0
You need to be logged in to leave comments. Login now