]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology/exit: use isinstance for python3 compatibility
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Tue, 8 Oct 2019 17:35:42 +0000 (19:35 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Tue, 8 Oct 2019 17:35:42 +0000 (19:35 +0200)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/exit.py
teuthology/test/test_exit.py

index 0b51c475121b4292c35368a82a1fc81b8bd1159b..266e988eba1e09f0939d06b16d4a368f34e4eb17 100644 (file)
@@ -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:
index b9b127c26148839c14b799f8cb9359d5eb7cd476..4a685fcb4a1708cefb345374d018b8edd2f97fc2 100644 (file)
@@ -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)