Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for read only file systems in migration #379

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jupyter_core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading