Skip to content

Commit 256af8f

Browse files
authored
Catch OSError instead of IOError
1 parent 41f138e commit 256af8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def save(self) -> None:
214214
try:
215215
with open(fname, "w") as f:
216216
parser.write(f)
217-
except IOError as error:
217+
except OSError as error:
218218
raise ConfigurationError(
219219
f"An error occurred while writing to the configuration file "
220220
f"{fname}: {error}"

0 commit comments

Comments
 (0)