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

twistd should print the subcommand name in its usage error messages #6460

Closed
twisted-trac opened this issue Apr 22, 2013 · 9 comments
Closed

Comments

@twisted-trac
Copy link

wallrj's avatar @wallrj reported
Trac ID trac#6460
Type enhancement
Created 2013-04-22 18:24:20Z

Certain twistd usage errors can cause confusion because they don't print the name of the subcommand. eg

[richard@zorin ~]$ twistd -n procmon -n

/home/richard/projects/Twisted/trunk/bin/twistd: option -n not recognized

In this case -n is a valid twistd option but an invalid twistd procmon option.

Another good reason for printing the subcommand sequence is that the error line is often preceded by a full usage message which pushes the original command line off the page. Having the subcommand in the error message will make it obvious in cases where you typed an unintended (but valid) subcommand.

eg twistd mail_pop instead of twistd mail_imap (assuming for a moment that those two plugins existed).

Attachments:

Searchable metadata
trac-id__6460 6460
type__enhancement enhancement
reporter__rwall rwall
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__easy easy
time__1366655060000000 1366655060000000
changetime__1613438585267958 1613438585267958
version__None None
owner__eevelweezel eevelweezel

@twisted-trac
Copy link
Author

wallrj's avatar @wallrj commented

It should be quite easy to write a unit test for this and (if necessary) review and fix any existing unit tests that are broken by it.

@twisted-trac
Copy link
Author

Infinity's avatar Infinity set owner to Infinity
Infinity set status to assigned

@twisted-trac
Copy link
Author

eevelweezel's avatar eevelweezel set owner to eevelweezel
eevelweezel set status to new

PR located at: #1504

@twisted-trac
Copy link
Author

glyph's avatar @glyph removed owner

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set owner to @wsanchez
@wsanchez set status to assigned

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set owner to eevelweezel
@wsanchez set status to new

@twisted-trac
Copy link
Author

wsanchez's avatar @wsanchez set status to closed

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

(Fixed in b1897c9 which didn't follow the commit message format)

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

(It's not in review now that it's merged.)

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

No branches or pull requests

1 participant