Skip to content

Missing else in dataset.py #687

@hannahbnelson

Description

@hannahbnelson

Inside dataset.py, in flatten(), there is the following block:

        if fs.isdir(entry):
            res.extend(fs.ls(entry))
        elif fs.isfile(entry):
            res.append(entry)

This is missing an else statement so if fs.isdir() and fs.isfile() are both false, there is no clear error message and this function doesn't behave correctly so it's very difficult to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions