trx_toolkit: fix compatibility with Python 3: 'is' vs '=='
Change-Id: I8ba05c04f206578cf61df58573c24cba1d6fba52
This commit is contained in:
parent
d206f0cc2f
commit
88e1620502
|
@ -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__':
|
||||
|
|
|
@ -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__':
|
||||
|
|
|
@ -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__':
|
||||
|
|
|
@ -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__':
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue