Skip to content

Commit

Permalink
properly process the header only parameter (#326)
Browse files Browse the repository at this point in the history
* properly process the header only parameter

The parameter is supposed to always be an int (older version of inspect do not pass it).

* if not specified, there is no limit

---------

Co-authored-by: jjallaire <[email protected]>
  • Loading branch information
dragonstyle and jjallaire authored Sep 4, 2024
1 parent 3439c34 commit d22d2be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inspect_ai/_view/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def handle_log(self) -> None:

# read query parameters from the URL
query_params = parse_qs(parsed.query)
header_only = query_params.get("header-only", None) is not None
header_param = query_params.get("header-only", None)
header_only = int(header_param[0]) if header_param is not None else sys.maxsize

# reconstruct the path
path = urlunparse(
Expand Down

0 comments on commit d22d2be

Please sign in to comment.