Skip to content

convert_os_errors error when converting errno.ENAMETOOLONG to PathError #453

@isaacHuh

Description

@isaacHuh

Using convert_os_errors to convert errno.ENAMETOOLONG to PathError results in unexpected keyword arguement 'exc' error. Seems that this line will set exc=exc_value however PathError does not take in exc parameter.

The following example code:

import errno
from fs.error_tools import convert_os_errors
from fs import errors as fserrors

try:
	from fs import open_fs
	f = open_fs('/tmp')
	f.open('x'*500, mode='w')
except OSError as e:
    with convert_os_errors("foo", "test"):
        raise e

results in: TypeError: init() got an unexpected keyword argument 'exc'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions