trx_toolkit: fix compatibility with Python 3: 'is' vs '=='

Change-Id: I8ba05c04f206578cf61df58573c24cba1d6fba52
This commit is contained in:
Vadim Yanitskiy 2019-07-24 05:40:37 +07:00
parent d206f0cc2f
commit 88e1620502
5 changed files with 6 additions and 5 deletions

View File

@ -190,7 +190,7 @@ class Application(ApplicationBase):
def sig_handler(self, signum, frame):
log.info("Signal %d received" % signum)
if signum is signal.SIGINT:
if signum == signal.SIGINT:
sys.exit(0)
if __name__ == '__main__':

View File

@ -149,7 +149,7 @@ class Application(ApplicationBase):
def sig_handler(self, signum, frame):
log.info("Signal %d received" % signum)
if signum is signal.SIGINT:
if signum == signal.SIGINT:
sys.exit(0)
if __name__ == '__main__':

View File

@ -111,7 +111,8 @@ class Application(ApplicationBase):
def sig_handler(self, signum, frame):
log.info("Signal %d received" % signum)
if signum is signal.SIGINT:
if signum == signal.SIGINT:
print("Stopping timer")
self.clck.stop()
if __name__ == '__main__':

View File

@ -114,7 +114,7 @@ class Application(ApplicationBase):
def sig_handler(self, signum, frame):
log.info("Signal %d received" % signum)
if signum is signal.SIGINT:
if signum == signal.SIGINT:
sys.exit(0)
if __name__ == '__main__':

View File

@ -496,7 +496,7 @@ class Application(ApplicationBase):
def sig_handler(self, signum, frame):
log.info("Signal %d received" % signum)
if signum is signal.SIGINT:
if signum == signal.SIGINT:
self.shutdown()
sys.exit(0)