Skip to content

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

Merged
inclement merged 1 commit intomasterfrom
unknown repository
Jan 26, 2019
Merged

Fix --private and others showing weird error when used without argument#1591
inclement merged 1 commit intomasterfrom
unknown repository

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