Skip to content

Commit 4e387a4

Browse files
authored
Account for read only file systems in migration (#379)
1 parent 257b483 commit 4e387a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_core/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ def migrate_config(self) -> None:
167167
try: # let's see if we can open the marker file
168168
# for reading and updating (writing)
169169
f_marker = Path.open(Path(self.config_dir, "migrated"), "r+")
170-
except PermissionError: # not readable and/or writable
171-
return # so let's give up migration in such an environment
172170
except FileNotFoundError: # cannot find the marker file
173171
pass # that means we have not migrated yet, so continue
172+
except OSError: # not readable and/or writable
173+
return # so let's give up migration in such an environment
174174
else: # if we got here without raising anything,
175175
# that means the file exists
176176
f_marker.close()

0 commit comments

Comments
 (0)