From 872ef6826a31cf3d852e91f59f9ad75b47766174 Mon Sep 17 00:00:00 2001 From: Cody Scott Date: Mon, 4 Mar 2024 14:28:19 -0500 Subject: [PATCH] Cleanup cli module --- atcom/cli.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/atcom/cli.py b/atcom/cli.py index 5698f4d..81fddd0 100755 --- a/atcom/cli.py +++ b/atcom/cli.py @@ -4,7 +4,6 @@ import serial import click import sys -import os import yaml from .__version__ import __version__ @@ -231,8 +230,8 @@ def handler(port, baudrate, timeout, verbose, rts_cts, dsr_dtr, config, at_comma response = at.send_at_comm(at_command, configs["timeout"]) status_code = 0 - if type(response) == dict: - if response["find"] == False: + if isinstance(response, dict): + if response["find"] is False: status_code = 1 logger.info("Couldn't find '{}' in response, exit status code set to 1".format(find))