Fix hdata decoding when it is empty

See this fix in WeeChat: https://github.com/weechat/weechat/issues/767
This commit is contained in:
Sébastien Helleu 2016-07-29 15:57:05 +02:00
parent c5db81a1c7
commit 9e7d09384a

View File

@ -243,8 +243,8 @@ class Protocol:
path = self._obj_str() path = self._obj_str()
keys = self._obj_str() keys = self._obj_str()
count = self._obj_int() count = self._obj_int()
list_path = path.split('/') list_path = path.split('/') if path else []
list_keys = keys.split(',') list_keys = keys.split(',') if keys else []
keys_types = [] keys_types = []
dict_keys = WeechatDict() dict_keys = WeechatDict()
for key in list_keys: for key in list_keys: