eric6/Utilities/__init__.py

changeset 8240
93b8a353c4bf
parent 8221
0572a215bd2f
child 8243
cc717c2ae956
--- a/eric6/Utilities/__init__.py	Wed Apr 14 19:38:19 2021 +0200
+++ b/eric6/Utilities/__init__.py	Wed Apr 14 19:59:16 2021 +0200
@@ -17,6 +17,7 @@
 import ctypes
 import subprocess           # secok
 import shlex
+import contextlib
 
 
 def __showwarning(message, category, filename, lineno, file=None, line=""):
@@ -655,11 +656,9 @@
                 # interpret as int first
                 value = int(value)
             except ValueError:
-                try:
+                with contextlib.suppress(ValueError):
                     # interpret as float next
                     value = float(value)
-                except ValueError:
-                    pass
             
             flags[key] = value
         else:

eric ide

mercurial