diff -r 1ca207782dde -r 316ee9fff395 etherlab/CommonEtherCATFunction.py --- a/etherlab/CommonEtherCATFunction.py Tue Oct 02 16:53:14 2018 +0300 +++ b/etherlab/CommonEtherCATFunction.py Tue Oct 02 17:18:09 2018 +0300 @@ -895,7 +895,7 @@ vendor_spec_strings = [] for element in device.getType().getcontent(): data += element - if data is not "" and isinstance(data, unicode): + if data != "" and isinstance(data, unicode): for vendor_spec_string in vendor_spec_strings: if data == vendor_spec_string: self.OrderIdx = vendor_spec_strings.index(data)+1 @@ -962,7 +962,7 @@ for device_item in group_etc["devices"]: if device == device_item[1]: data = group_etc["name"] - if data is not "" and isinstance(data, unicode): + if data != "" and isinstance(data, unicode): for vendor_spec_string in vendor_spec_strings: if data == vendor_spec_string: groupnameflag = True @@ -981,7 +981,7 @@ for element in device.getName(): if element.getLcId() == 1 or element.getLcId() == 1033: data = element.getcontent() - if data is not "" and isinstance(data, unicode): + if data != "" and isinstance(data, unicode): for vendor_spec_string in vendor_spec_strings: if data == vendor_spec_string: self.NameIdx = vendor_spec_strings.index(data)+1 @@ -1048,7 +1048,7 @@ if device.getDc() is not None: for element in device.getDc().getOpMode(): data = element.getName() - if data is not "": + if data != "": count += 1 self.Strings.append(data) dc_related_elements += "{:0>2x}".format(len(data)) @@ -1066,7 +1066,7 @@ for input in inputs: if data == input: data = "" - if data is not "": + if data != "": count += 1 self.Strings.append(data) inputs.append(data) @@ -1080,7 +1080,7 @@ for input in inputs: if data == input: data = "" - if data is not "": + if data != "": count += 1 self.Strings.append(data) inputs.append(data) @@ -1099,7 +1099,7 @@ for output in outputs: if data == output: data = "" - if data is not "": + if data != "": count += 1 self.Strings.append(data) outputs.append(data) @@ -1113,7 +1113,7 @@ for output in outputs: if data == output: data = "" - if data is not "": + if data != "": count += 1 self.Strings.append(data) outputs.append(data) @@ -1279,7 +1279,7 @@ data += "03" # construct of EEPROM data - if data is not "": + if data != "": # category header eeprom.append("28") eeprom.append("00") @@ -1328,7 +1328,7 @@ data += "00" data += number[sm.getcontent()] - if data is not "": + if data != "": # category header eeprom.append("29") eeprom.append("00") @@ -1431,7 +1431,7 @@ en_fixed = True data += str(int(en_fixed)) + "000" - if data is not "": + if data != "": # category header if pdotype == "TxPdo": eeprom.append("32") @@ -1510,7 +1510,7 @@ data += "0000" data += "0000" - if data is not "": + if data != "": # category header eeprom.append("3c") eeprom.append("00")