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 --private and others showing weird error when used without argument #1591

Merged
merged 1 commit into from Jan 26, 2019
Merged

Fix --private and others showing weird error when used without argument #1591

merged 1 commit into from Jan 26, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jan 15, 2019

When using some of the options like --private without an argument, which shouldn't be done but users make mistakes sometimes, this currently causes a weird backtrace error that isn't obvious to the average user. This pull request addresses that problem such that better error handling can happen

@homdx
Copy link

homdx commented Jan 15, 2019

Very good!!! @Jonast , thank you !

checked in added link
#1570 (comment)

Copy link
Member

@inclement inclement left a comment

Choose a reason for hiding this comment

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

I guess I also missed that this should really also check if the i+1th entry is also an argument (starting with - or --) before converting it to a path.

@inclement inclement merged commit 9a2ee0b into kivy:master Jan 26, 2019
@ghost
Copy link
Author

ghost commented Jan 26, 2019

@inclement argparse supports -- though after which - in front of a path is allowed. So this might break legitimate path arguments if that's not taken into account... could make things complicated

@inclement
Copy link
Member

@Jonast Sure, it's not that we need to reinvent the argparse logic so much as that it would probably improve more errors than it makes worse.

@ghost ghost deleted the fixargparseerror branch January 27, 2019 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants