From 9e7d09384a96dcd2d49e837f67355a07eb194c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 29 Jul 2016 15:57:05 +0200 Subject: [PATCH] Fix hdata decoding when it is empty See this fix in WeeChat: https://github.com/weechat/weechat/issues/767 --- qweechat/weechat/protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qweechat/weechat/protocol.py b/qweechat/weechat/protocol.py index 1765346..31db088 100644 --- a/qweechat/weechat/protocol.py +++ b/qweechat/weechat/protocol.py @@ -243,8 +243,8 @@ class Protocol: path = self._obj_str() keys = self._obj_str() count = self._obj_int() - list_path = path.split('/') - list_keys = keys.split(',') + list_path = path.split('/') if path else [] + list_keys = keys.split(',') if keys else [] keys_types = [] dict_keys = WeechatDict() for key in list_keys: