Bug on updateElementName fixed
authorlaurent
Mon, 07 Dec 2009 09:57:25 +0100
changeset 470 cc64bbb1d654
parent 469 17411b970353
child 471 ea90da16a5e2
Bug on updateElementName fixed
plcopen/plcopen.py
--- a/plcopen/plcopen.py	Sun Dec 06 21:20:55 2009 +0100
+++ b/plcopen/plcopen.py	Mon Dec 07 09:57:25 2009 +0100
@@ -734,7 +734,7 @@
             for var in varlist.getvariable():
                 var_address = var.getaddress()
                 if var_address is not None:
-                    if var_address == oldname:
+                    if var_address == old_name:
                         var.setaddress(new_name)
                     if var.getname() == old_name:
                         var.setname(new_name)
@@ -778,7 +778,7 @@
             for var in varlist.getvariable():
                 var_address = var.getaddress()
                 if var_address is not None:
-                    if var_address == oldname:
+                    if var_address == old_name:
                         var.setaddress(new_name)
                     if var.getname() == old_name:
                         var.setname(new_name)
@@ -1219,7 +1219,7 @@
                 for var in content["value"].getvariable():
                     var_address = var.getaddress()
                     if var_address is not None:
-                        if var_address == oldname:
+                        if var_address == old_name:
                             var.setaddress(new_name)
                         if var.getname() == old_name:
                             var.setname(new_name)