eric6/Preferences/ShortcutsFile.py

changeset 8240
93b8a353c4bf
parent 8218
7c09585bd960
child 8244
ed8cb108b27b
--- a/eric6/Preferences/ShortcutsFile.py	Wed Apr 14 19:38:19 2021 +0200
+++ b/eric6/Preferences/ShortcutsFile.py	Wed Apr 14 19:59:16 2021 +0200
@@ -162,7 +162,7 @@
             jsonString = json.dumps(shortcutsDict, indent=2)
             with open(filename, "w") as f:
                 f.write(jsonString)
-        except (TypeError, EnvironmentError) as err:
+        except (TypeError, OSError) as err:
             with E5OverridenCursor():
                 E5MessageBox.critical(
                     None,
@@ -192,7 +192,7 @@
             with open(filename, "r") as f:
                 jsonString = f.read()
             shortcutsDict = json.loads(jsonString)
-        except (EnvironmentError, json.JSONDecodeError) as err:
+        except (OSError, json.JSONDecodeError) as err:
             E5MessageBox.critical(
                 None,
                 self.tr("Import Keyboard Shortcuts"),

eric ide

mercurial