fix name clash python3
authorGP Orcullo <kinsamanka@gmail.com>
Sat, 04 Feb 2023 07:19:52 +0800
branchpython3
changeset 3784 a5f58ca4629b
parent 3783 741d0010b4b2
child 3785 29bc2bebf1d4
fix name clash
modbus/modbus.py
--- a/modbus/modbus.py	Sat Feb 04 07:18:21 2023 +0800
+++ b/modbus/modbus.py	Sat Feb 04 07:19:52 2023 +0800
@@ -92,9 +92,9 @@
             if element["name"] == "ModbusRequest":
                 for child in element["children"]:
                     if child["name"] == "Function":
-                        list = list(modbus_function_dict.keys())
-                        list.sort()
-                        child["type"] = list
+                        _list = list(modbus_function_dict.keys())
+                        _list.sort()
+                        child["type"] = _list
         return infos
 
     def GetVariableLocationTree(self):
@@ -238,9 +238,9 @@
             if element["name"] == "MemoryArea":
                 for child in element["children"]:
                     if child["name"] == "MemoryAreaType":
-                        list = list(modbus_memtype_dict.keys())
-                        list.sort()
-                        child["type"] = list
+                        _list = list(modbus_memtype_dict.keys())
+                        _list.sort()
+                        child["type"] = _list
         return infos
 
     def GetVariableLocationTree(self):