This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients SilentGhost, opensource-assist, steven.daprano
Date 2020-01-28.13:04:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580216666.44.0.907630934478.issue39468@roundup.psfhosted.org>
In-reply-to
Content
Reporting a better error message than just "Unknown error -1" is a good idea. Stating "an error occurred..." is hardly any better.

The correct error is, I think, "permission denied". Trying to diagnose the *specific* issue (read-only file? file owned by another user? read-only file system? samba permissions? etc) is probably a waste of time. The human reading the error can do that.

Having Python automatically run chattr -i is a bad design. If I've made the history file immutable, it is because I want it to be immutable, not because I want random applications to try to sneakily make it mutable again. Python's role in this should end when it reports that it doesn't have write permission to the file.
History
Date User Action Args
2020-01-28 13:04:26steven.dapranosetrecipients: + steven.daprano, SilentGhost, opensource-assist
2020-01-28 13:04:26steven.dapranosetmessageid: <1580216666.44.0.907630934478.issue39468@roundup.psfhosted.org>
2020-01-28 13:04:26steven.dapranolinkissue39468 messages
2020-01-28 13:04:26steven.dapranocreate