[New-bugs-announce] [issue41193] traceback when exiting on read-only file system

Zbyszek Jędrzejewski-Szmek report at bugs.python.org
Thu Jul 2 05:13:51 EDT 2020


New submission from Zbyszek Jędrzejewski-Szmek <zbyszek at in.waw.pl>:

[Originally reported as https://bugzilla.redhat.com/show_bug.cgi?id=1852941.]

$ touch ~/foo
touch: cannot touch '/home/fedora/foo': Read-only file system
$ python
Python 3.9.0b3 (default, Jun 10 2020, 00:00:00) 
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python3.9/site.py", line 462, in write_history
    readline.write_history_file(history)
OSError: [Errno 30] Read-only file system

Looking at /usr/lib64/python3.9/site.py, it already silently skips
PermissionError. If a user is running with the file system in ro mode,
they almost certainly are aware of the fact, since this is done either
on purpose or as a result of disk corruption, and the traceback from
python is not useful. Suppression of PermissionError was added in b2499669ef2e6dc9a2cdb49b4dc498e078167e26.

Version-Release number of selected component (if applicable):
python3-3.9.0~b3-1.fc33.x86_64

----------
messages: 372832
nosy: zbysz
priority: normal
severity: normal
status: open
title: traceback when exiting on read-only file system
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41193>
_______________________________________


More information about the New-bugs-announce mailing list