python3 support: pylint, W1659 # (xreadlines-attribute) Accessing a removed xreadlines attribute
--- a/ProjectController.py Tue Oct 09 12:05:43 2018 +0300
+++ b/ProjectController.py Tue Oct 09 13:50:29 2018 +0300
@@ -771,7 +771,7 @@
plc_file.close()
plc_file = open(self._getIECcodepath(), "r")
self.ProgramOffset = 0
- for dummy in plc_file.xreadlines():
+ for dummy in plc_file.readlines():
self.ProgramOffset += 1
plc_file.close()
plc_file = open(self._getIECcodepath(), "a")
@@ -953,7 +953,7 @@
# Separate sections
ListGroup = []
- for line in open(csvfile, 'r').xreadlines():
+ for line in open(csvfile, 'r').readlines():
strippedline = line.strip()
if strippedline.startswith("//"):
# Start new section
--- a/i18n/mki18n.py Tue Oct 09 12:05:43 2018 +0300
+++ b/i18n/mki18n.py Tue Oct 09 13:50:29 2018 +0300
@@ -149,7 +149,7 @@
messages_file.write('\n')
words_found = {}
- for filepath in appfil_file.xreadlines():
+ for filepath in appfil_file.readlines():
code_file = open(filepath.strip(), 'r')
for match in regexp.finditer(code_file.read()):
word = match.group(1)
--- a/plcopen/structures.py Tue Oct 09 12:05:43 2018 +0300
+++ b/plcopen/structures.py Tue Oct 09 13:50:29 2018 +0300
@@ -104,7 +104,7 @@
"""
take a .csv file and translate it it a "csv_table"
"""
- return [map(string.strip, line.split(';')) for line in file.xreadlines()]
+ return [map(string.strip, line.split(';')) for line in file.readlines()]
def find_section(section_name, table):
--- a/tests/tools/check_source.sh Tue Oct 09 12:05:43 2018 +0300
+++ b/tests/tools/check_source.sh Tue Oct 09 13:50:29 2018 +0300
@@ -360,6 +360,7 @@
enable=$enable,W1612 # (unicode-builtin) unicode built-in referenced
enable=$enable,W1619 # (old-division) division w/o __future__ statement
enable=$enable,W1601 # (apply-builtin) apply built-in referenced
+ enable=$enable,W1659 # (xreadlines-attribute) Accessing a removed xreadlines attribute
# enable=
options=