Skip to content

Commit 034cef8

Browse files
committed
Be specific about exceptions to ignore
1 parent f3b6df8 commit 034cef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/mailbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ def flush(self):
755755
os.chmod(new_file.name, info.st_mode)
756756
try:
757757
os.chown(new_file.name, info.st_uid, info.st_gid)
758-
except:
758+
except (AttributeError, OSError):
759759
pass
760760
try:
761761
os.rename(new_file.name, self._path)

0 commit comments

Comments
 (0)