# HG changeset patch # User Andrey Skvortsov # Date 1538231961 -10800 # Node ID 87eb184414bdabafc4e89f6291f0ebefd7da0301 # Parent 045df8ecc8b3c8f8037abe17b4e8abd97309d54d clean etherlab: pylint,E0602 # (undefined-variable) Undefined variable 'X' diff -r 045df8ecc8b3 -r 87eb184414bd .pylint --- a/.pylint Sat Sep 29 17:12:44 2018 +0300 +++ b/.pylint Sat Sep 29 17:39:21 2018 +0300 @@ -110,7 +110,7 @@ # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. -additional-builtins=_,website,JS,cobalt +additional-builtins=_,website,JS,cobalt,PLCBinary # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. diff -r 045df8ecc8b3 -r 87eb184414bd etherlab/EthercatMaster.py --- a/etherlab/EthercatMaster.py Sat Sep 29 17:12:44 2018 +0300 +++ b/etherlab/EthercatMaster.py Sat Sep 29 17:39:21 2018 +0300 @@ -249,7 +249,7 @@ if error is not None: self.GetCTRoot().logger.write_error( - _("Couldn't load %s network configuration file.") % CTNName) + _("Couldn't load %s network configuration file.") % self.CTNName()) if self.Config is None: self.Config = EtherCATConfigParser.CreateElement("EtherCATConfig") @@ -270,7 +270,7 @@ if error is not None: self.GetCTRoot().logger.write_error( - _("Couldn't load %s network process variables file.") % CTNName) + _("Couldn't load %s network process variables file.") % self.CTNName()) if self.ProcessVariables is None: self.ProcessVariables = ProcessVariablesParser.CreateElement("ProcessVariables") diff -r 045df8ecc8b3 -r 87eb184414bd etherlab/runtime_etherlab.py --- a/etherlab/runtime_etherlab.py Sat Sep 29 17:12:44 2018 +0300 +++ b/etherlab/runtime_etherlab.py Sat Sep 29 17:39:21 2018 +0300 @@ -1,9 +1,12 @@ import os +import signal import subprocess import ctypes from threading import Thread import time import re + +import runtime.PLCObject as PLCObject from runtime.loglevels import LogLevelsDict SDOAnswered = PLCBinary.SDOAnswered @@ -111,7 +114,7 @@ def _runtime_etherlab_cleanup(): global KMSGPollThread, StopKMSGThread, SDOProc, SDOThread try: - os.kill(SDOProc.pid, SIGTERM) + os.kill(SDOProc.pid, signal.SIGTERM) except Exception: pass SDOThread = None