# HG changeset patch # User Andrey Skvortsov # Date 1508228960 -10800 # Node ID 62aaabbf8812df4e0096076db59a5551d46d8078 # Parent a347459df3a4c8639c97f8589c0ae4b8142e8663 fix pylint warning '(redefine-in-handler) Redefining name 'X' from outer scope (line Y) in exception handler' diff -r a347459df3a4 -r 62aaabbf8812 PLCControler.py --- a/PLCControler.py Tue Oct 17 11:09:01 2017 +0300 +++ b/PLCControler.py Tue Oct 17 11:29:20 2017 +0300 @@ -912,8 +912,8 @@ programfile.close() self.ProgramFilePath = filepath return program_text, errors, warnings - except PLCGenException, e: - errors.append(e.message) + except PLCGenException, ex: + errors.append(ex.message) else: errors.append("No project opened") return "", errors, warnings diff -r a347459df3a4 -r 62aaabbf8812 tests/tools/check_source.sh --- a/tests/tools/check_source.sh Tue Oct 17 11:09:01 2017 +0300 +++ b/tests/tools/check_source.sh Tue Oct 17 11:29:20 2017 +0300 @@ -260,6 +260,9 @@ enable=$enable,E1121 # (too-many-function-args) Too many positional arguments for function call enable=$enable,E0602 # (undefined-variable) Undefined variable 'X' enable=$enable,W0232 # (no-init) Class has no __init__ method + enable=$enable,W0233 # (non-parent-init-called) __init__ method from a non direct base class 'X' is called + enable=$enable,W0601 # (global-variable-undefined) Global variable 'X' undefined at the module level + enable=$enable,W0623 # (redefine-in-handler) Redefining name 'X' from outer scope (line Y) in exception handler # enable= options=