Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error on illegal page size #662

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

andrewalexander
Copy link

Adds an error if a page size greater than the API's maximum of 1000 is entered. It also includes a message instructing users to use --pages -1 to fetch all pages in the event they hit this error.

@harningt
Copy link
Contributor

Bet it wants you to break up that line :(

Copy link
Contributor

@harningt harningt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poetry black censys/ made the suggested fix I presented

Co-authored-by: Thomas Harning Jr <[email protected]>
@@ -557,6 +557,13 @@ def cli_execute_saved_query_by_name(args: argparse.Namespace):
sys.exit(1)
query = results[0]["query"]

if args.page_size > 1000:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this looks like a great addition, maybe we can add this argument condition to before we fetch the saved query?

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

Successfully merging this pull request may close these issues.

3 participants