Skip to content

file-related OSErrors should include filename or FDΒ #124906

@ThomasWaldmann

Description

@ThomasWaldmann

Feature or enhancement

Proposal:

  # Python 3.11.2
  File "/usr/lib/python3/dist-packages/borg/locking.py", line 291, in save
    with open(self.path, "w") as f:
OSError: [Errno 95] Operation not supported

This is not very helpful:

  • it is unclear what exactly failed (something within open, but what exactly?)
  • it is unclear what self.path was at that time. the filename should be included in the OSError instance and in the message generated for the traceback.

@hadess tracked this down to be a problem in gvfs, but it was more work due to missing information. For more information, see there:

borgbackup/borg#8120 (comment)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions