Skip to content

Handle non-iterables for ntpath.commonpath #117335

Description

@nineteendo

Bug report

Bug description:

>>>importntpath>>>ntpath.commonpath(None)
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"<frozen ntpath>", line826, incommonpathValueError: commonpath() argisanemptysequence

Expected: TypeError: 'NoneType' object is not iterable like for posixpath.commonpath.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions