Changed a MicroPython script slightly to be able to deal with devices without a file system. eric7

Sun, 02 Apr 2023 11:13:14 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Apr 2023 11:13:14 +0200
branch
eric7
changeset 9957
0457d754fc9a
parent 9956
5b138f996a1e
child 9958
a78b83d1062a

Changed a MicroPython script slightly to be able to deal with devices without a file system.

src/eric7/MicroPython/Devices/DeviceBase.py file | annotate | diff | comparison | revisions
--- a/src/eric7/MicroPython/Devices/DeviceBase.py	Sat Apr 01 15:38:31 2023 +0200
+++ b/src/eric7/MicroPython/Devices/DeviceBase.py	Sun Apr 02 11:13:14 2023 +0200
@@ -1131,7 +1131,7 @@
         res['flash_used_kb'] = res['flash_total_kb'] - res['flash_free_kb']
         res['flash_free_pc'] = res['flash_free_kb'] / res['flash_total_kb'] * 100.0
         res['flash_used_pc'] = res['flash_used_kb'] / res['flash_total_kb'] * 100.0
-    except AttributeError:
+    except (AttributeError, OSError):
         res['flash_info_available'] = False
 
     try:

eric ide

mercurial