Skip to content

build_subsets.main() depends on prepare() having run, and fails with a KeyError deep in scan() otherwise #117

Description

@realmarcin

From the review of #108.

MECHS and hab_pages are declared empty at module level and filled by prepare(); only the __main__ block calls prepare() before main(). Anyone importing the module and calling main() — a test, a future driver script — gets KeyError: 'HabitatMech' from scan() rather than a message saying the checkouts were never resolved.

Fix belongs in #108: have main() call prepare() itself (it is idempotent enough for a single run, and main() is the one entry point that needs the filesystem), and keep __main__ calling main() alone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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