# HG changeset patch # User Andrey Skvortsov # Date 1539082229 -10800 # Node ID c553769a65af8a3e33d20fb5d2170471887b327f # Parent 45b43f275ca15929015f7aa2a0c3c17cc76753a7 python3 support: pylint, W1659 # (xreadlines-attribute) Accessing a removed xreadlines attribute diff -r 45b43f275ca1 -r c553769a65af ProjectController.py --- 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 diff -r 45b43f275ca1 -r c553769a65af i18n/mki18n.py --- 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) diff -r 45b43f275ca1 -r c553769a65af plcopen/structures.py --- 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): diff -r 45b43f275ca1 -r c553769a65af tests/tools/check_source.sh --- 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=