Skip to content

concore watch crashes on a negative --interval #582

Description

@bhuvan-somisetty

Noticed this while poking at `concore watch`.

`--interval` is passed straight through to `time.sleep(interval)` in the refresh loop, no validation anywhere along the way. Pass a negative number and it crashes with an unhandled `ValueError: sleep length must be non-negative` instead of a normal error message. `--interval 0` isn't rejected either, just turns the watch loop into a tight busy-loop.

Every other command in `cli.py` validates bad input and prints `[red]Error:[/red] ...` before exiting, this one just doesn't check.

Should be a quick fix, reject `interval <= 0` before calling `watch_study()`. Good first issue for someone new to the repo.

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