]> jfr.im git - irc/weechat/qweechat.git/commitdiff
Fix hdata decoding when it is empty
authorSébastien Helleu <redacted>
Fri, 29 Jul 2016 13:57:05 +0000 (15:57 +0200)
committerSébastien Helleu <redacted>
Fri, 29 Jul 2016 13:57:05 +0000 (15:57 +0200)
See this fix in WeeChat: https://github.com/weechat/weechat/issues/767

qweechat/weechat/protocol.py

index 1765346fe181bd90405ee3e4c5334b41c430875a..31db088cb30b154f9a9eac13e9cb055c97129cf5 100644 (file)
@@ -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: