mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[GH-ISSUE #2737] modo management command does not support Django default args (notably --verbosity) #1692
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1692
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bernd-wechner on GitHub (Jan 3, 2023).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2737
Impacted versions
Current behavior
try this:
Expected behavior
Expect all commands and subcommands to honor the tips provided by help:
That includes
-vI haven't tried others, but expect they too got lost in the process.
@Spitfireap commented on GitHub (Jan 4, 2023):
Hi,
I have just tested it and if I put
--verbosityafter the subcommand, it doesn't get recognized, while it does if it is place before the subcommand. This is becausemanage_dkim_keysdo not have any arguments... Can you confirm it is the same on your side ?@bernd-wechner commented on GitHub (Jan 4, 2023):
Can you clarify your meaning, as I think there's a typo, you said it both does work and doesn't work after the subcommand. My results from a try just now are:
python manage.py --verbosity 3 modo manage_dkim_keysreturnsUnknown command: '--verbosity'which it should not (bug)python manage.py modo --verbosity 3 manage_dkim_keysdoes work and sets the optionverbosityto 3 in the handler.python manage.py modo manage_dkim_keys --verbosity 3returnsmanage.py modo: error: unrecognized arguments: --verbosity 3which it should not (bug)Looks like one combo does work, but two do not. I would never have guess that middle one to be hones and command line options shoudl work regardless of placement.
@Spitfireap commented on GitHub (Jan 4, 2023):
Yes, sorry, I corrected it.
I agree that this one should work.
This one I'm not sure :
/srv/modoboa/env/bin/python ./manage.py modo manage_dkim_keys -hreturn basically nothing (because manage_dkim_keys do not support any argument, actually).@bernd-wechner commented on GitHub (Jan 5, 2023):
I would argue it should, as a mantra all commands and subcommands should be supporting the standard command line options Django provides (like --verbosity and --help). I don't see it as any overhead to do so, rather an oversight not to.
@stale[bot] commented on GitHub (Mar 11, 2023):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.