diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 331adab..3460574 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -163,7 +163,8 @@ def setPref(attributes, name, valStr): val = fromStr(valStr) enumType = field.enum_type - if enumType and isinstance(val) == str: + # pylint: disable=C0123 + if enumType and type(val) == str: # We've failed so far to convert this string into an enum, try to find it by reflection e = enumType.values_by_name.get(val) if e: diff --git a/meshtastic/test/test_smoke1.py b/meshtastic/test/test_smoke1.py index 74c1d26..242604f 100644 --- a/meshtastic/test/test_smoke1.py +++ b/meshtastic/test/test_smoke1.py @@ -373,6 +373,8 @@ def test_smoke1_seturl_invalid_url(): assert re.match(r'Connected to radio', out) assert re.search('Warning: There were no settings', out, re.MULTILINE) assert return_value == 1 + # pause for the radio + time.sleep(PAUSE_AFTER_COMMAND) @pytest.mark.smoke1 @@ -391,6 +393,8 @@ def test_smoke1_configure(): assert re.search('^Set screen_on_secs to 31536000', out, re.MULTILINE) assert re.search('^Set wait_bluetooth_secs to 31536000', out, re.MULTILINE) assert re.search('^Writing modified preferences to device', out, re.MULTILINE) + # pause for the radio + time.sleep(PAUSE_AFTER_REBOOT) @pytest.mark.smoke1