PLCControler.py
changeset 1852 70c1cc354a8f
parent 1850 614396cbffbf
child 1872 866fb3ab8778
--- a/PLCControler.py	Mon Oct 09 12:30:14 2017 +0300
+++ b/PLCControler.py	Mon Oct 09 16:04:39 2017 +0300
@@ -2330,8 +2330,8 @@
             element.remove(copy_body)
         return text
 
-    def GenerateNewName(self, tagname, name, format, start_idx=0, exclude={}, debug=False):
-        names = exclude.copy()
+    def GenerateNewName(self, tagname, name, format, start_idx=0, exclude=None, debug=False):
+        names = {} if exclude is None else exclude.copy()
         if tagname is not None:
             names.update(dict([(varname.upper(), True)
                                for varname in self.GetEditedElementVariables(tagname, debug)]))