src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py

branch
eric7
changeset 10908
ef1b3cd9a6ca
parent 10900
4139f17d07ad
child 11011
f1f1c8d0255d
diff -r c424150d2ac8 -r ef1b3cd9a6ca src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py
--- a/src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py	Tue Sep 03 17:28:40 2024 +0200
+++ b/src/eric7/MicroPython/Devices/CircuitPythonUpdater/CircupFunctions.py	Tue Sep 03 17:42:44 2024 +0200
@@ -37,10 +37,11 @@
         modules on the connected device
     @rtype list of circup.Module
     """
-    if isinstance(device_path, str):
-        backend = circup.DiskBackend(device_path, circup.logger)
-    else:
-        backend = device_path
+    backend = (
+        circup.DiskBackend(device_path, circup.logger)
+        if isinstance(device_path, str)
+        else device_path
+    )
     result = []
     try:
         device_modules = backend.get_device_versions()

eric ide

mercurial