cmd_create improved to fail gracefully if no argument is provided.
This commit is contained in:
parent
cc3c54b3fe
commit
da505f3bf5
1 changed files with 5 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ def cmd_create(command):
|
|||
session = command.session
|
||||
|
||||
# Argument check.
|
||||
# Fail gracefully if no argument is provided
|
||||
if not command.command_argument:
|
||||
session.msg("No arguments provided\n Usage (without <>): create \"<username>\" <email> <password>")
|
||||
return
|
||||
|
||||
arg_list = command.command_argument.split()
|
||||
if not functions_general.cmd_check_num_args(session, arg_list, 2):
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue