From d0f8dcd3cb9729bdde76b723889d3f4c7d7c967b Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 21 Aug 2023 11:42:48 +0200 Subject: [PATCH] do not compare types, use isinstance --- run-queue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-queue b/run-queue index d518cc1531..890cb950c0 100755 --- a/run-queue +++ b/run-queue @@ -166,12 +166,12 @@ def main(): logging.info("All queues are empty") return 1 - if type(cmd) is list: + if isinstance(cmd, list): cmd_str = ' '.join(cmd) else: cmd_str = cmd logging.info("Consuming message with command: %s", cmd_str) - p = subprocess.Popen(cmd, shell=type(cmd) is str) + p = subprocess.Popen(cmd, shell=isinstance(cmd, str)) while p.poll() is None: q.connection.process_data_events() time.sleep(3)