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

Option with empty argument causing TypeError #49

Closed
jblakeman opened this issue Oct 10, 2016 · 0 comments
Closed

Option with empty argument causing TypeError #49

jblakeman opened this issue Oct 10, 2016 · 0 comments
Assignees
Labels

Comments

@jblakeman
Copy link
Owner

Arguments -t/--top-number and -m/--min-status fall back to default values when the options are not present on the command line. However, when they are passed without a following argument, None is stored and causes the following error:

TypeError: unsupported operand type for long(): 'NoneType'

Use the const keyword argument to argparse.add_argument, storing the option's default value to handle those cases.

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

No branches or pull requests

1 participant