From d80d93b2506306e86bbd0d4b059e5848cbd8bc23 Mon Sep 17 00:00:00 2001 From: jamesvclemence Date: Mon, 12 Jan 2009 08:49:19 +0000 Subject: [PATCH] cmd_connect improved to fail gracefully if no argument is provided. --- src/commands/unloggedin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/unloggedin.py b/src/commands/unloggedin.py index 01f66fef6b..08f9e3a2c5 100644 --- a/src/commands/unloggedin.py +++ b/src/commands/unloggedin.py @@ -16,6 +16,11 @@ def cmd_connect(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 <>): connect ") + return + arg_list = command.command_argument.split() if not functions_general.cmd_check_num_args(session, arg_list, 2): return