From 3614c789716a5e1a9d8aae608c1ff7a56d47121e Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sun, 8 Nov 2015 05:14:55 +0000 Subject: [PATCH] Corrected indexoutofrange exception when handling certain serverqueries --- services/managers/util/ts3.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/services/managers/util/ts3.py b/services/managers/util/ts3.py index f13a04ba..1122737b 100755 --- a/services/managers/util/ts3.py +++ b/services/managers/util/ts3.py @@ -139,11 +139,12 @@ class TS3Proto(): v = [v[0], '='.join(v[1:])] key, value = v keys[key] = self._unescape_str(value) - elif v[0][0] and v[0][0] == '-': - # Option - opts.append(v[0][1:]) - else: - command = v[0] + elif (not v == ['']): + if v[0][0] and v[0][0] == '-': + # Option + opts.append(v[0][1:]) + else: + command = v[0] d = {'keys': keys, 'opts': opts} if command: @@ -241,4 +242,4 @@ class TS3Server(TS3Proto): @type id: int """ if self._connected and id > 0: - self.send_command('use', keys={'sid': id}) \ No newline at end of file + self.send_command('use', keys={'sid': id})