diff --git a/jupyter_core/application.py b/jupyter_core/application.py index 81d8efe..f2fe221 100644 --- a/jupyter_core/application.py +++ b/jupyter_core/application.py @@ -167,10 +167,10 @@ def migrate_config(self) -> None: try: # let's see if we can open the marker file # for reading and updating (writing) f_marker = Path.open(Path(self.config_dir, "migrated"), "r+") - except PermissionError: # not readable and/or writable - return # so let's give up migration in such an environment except FileNotFoundError: # cannot find the marker file pass # that means we have not migrated yet, so continue + except OSError: # not readable and/or writable + return # so let's give up migration in such an environment else: # if we got here without raising anything, # that means the file exists f_marker.close()