From c8cbca35892b49d69956cf71be5fde14704e0713 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Tue, 8 Oct 2019 19:35:42 +0200 Subject: [PATCH] teuthology/exit: use isinstance for python3 compatibility Signed-off-by: Kyr Shatskyy --- teuthology/exit.py | 2 +- teuthology/test/test_exit.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/exit.py b/teuthology/exit.py index 0b51c47512..266e988eba 100644 --- a/teuthology/exit.py +++ b/teuthology/exit.py @@ -23,7 +23,7 @@ class Exiter(object): my_handler(signal, frame) """ - if type(signals) is int: + if isinstance(signals, int): signals = [signals] for signal_ in signals: diff --git a/teuthology/test/test_exit.py b/teuthology/test/test_exit.py index b9b127c261..4a685fcb4a 100644 --- a/teuthology/test/test_exit.py +++ b/teuthology/test/test_exit.py @@ -72,7 +72,7 @@ class TestExiter(object): assert handler.func.call_count == 0 def test_n_handlers(self, n=10, sig=11): - if type(sig) is int: + if isinstance(sig, int): send_sig = sig else: send_sig = random.choice(sig) -- 2.39.5