From d2e5f157faf0a0591cb3174ca7c26ae16a3bce2a Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 17 Aug 2008 18:06:08 +0000 Subject: [PATCH] Fix #415 crash when using 'config-set' with no parameters --- deluge/ui/null/deluge_shell.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deluge/ui/null/deluge_shell.py b/deluge/ui/null/deluge_shell.py index ab3797fde..793d35583 100755 --- a/deluge/ui/null/deluge_shell.py +++ b/deluge/ui/null/deluge_shell.py @@ -214,7 +214,11 @@ class CommandConfig(Command): class CommandConfigSet(Command): def execute(self, cmd): - key = cmd[1] + try: + key = cmd[1] + except IndexError: + self.usage() + return # Returns (correct_type, type_value) def convert_type(target, source):