From 83af211feae036ab33ffb22348d5249a0c3b38ba Mon Sep 17 00:00:00 2001 From: Chris Reed Date: Thu, 25 Feb 2021 17:51:12 -0600 Subject: [PATCH] Pico: fix warnings from LGTM. --- pyocd/probe/picoprobe.py | 2 +- pyocd/probe/pydapaccess/cmsis_dap_core.py | 1 - pyocd/target/builtin/target_RP2040.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyocd/probe/picoprobe.py b/pyocd/probe/picoprobe.py index 17de8e3b5..15a1a10b7 100644 --- a/pyocd/probe/picoprobe.py +++ b/pyocd/probe/picoprobe.py @@ -250,7 +250,7 @@ def __call__(self, dev): try: # This can fail on Linux if the configuration is already active. dev.set_configuration() - except: + except Exception: # But do no act on possible errors, they'll be caught in the next try: clause pass diff --git a/pyocd/probe/pydapaccess/cmsis_dap_core.py b/pyocd/probe/pydapaccess/cmsis_dap_core.py index f9b9c7ce0..866eee0f2 100644 --- a/pyocd/probe/pydapaccess/cmsis_dap_core.py +++ b/pyocd/probe/pydapaccess/cmsis_dap_core.py @@ -16,7 +16,6 @@ import array from .dap_access_api import DAPAccessIntf -from ...utility import compatibility class Command: DAP_INFO = 0x00 diff --git a/pyocd/target/builtin/target_RP2040.py b/pyocd/target/builtin/target_RP2040.py index 8211d11c3..9a2b86802 100644 --- a/pyocd/target/builtin/target_RP2040.py +++ b/pyocd/target/builtin/target_RP2040.py @@ -18,10 +18,10 @@ from ...core import exceptions from ...coresight.coresight_target import CoreSightTarget -from ...core.memory_map import (RomRegion, FlashRegion, RamRegion, DeviceRegion, MemoryMap) +from ...core.memory_map import (RomRegion, FlashRegion, RamRegion, MemoryMap) from ...probe.swj import SWJSequenceSender from ...probe.debug_probe import DebugProbe -from ...utility import (conversion, mask) +from ...utility import mask LOG = logging.getLogger(__name__)