changeset 1440:226bbe758b1a

plugin misc_groupblog: pubsub response do not fail when target server doesn't handle RSM
author souliane <souliane@mailoo.org>
date Tue, 14 Jul 2015 16:44:15 +0200 (2015-07-14)
parents ea48663b2605
children b4c49c234c6b
files src/plugins/plugin_misc_groupblog.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_misc_groupblog.py	Tue Jul 14 16:41:59 2015 +0200
+++ b/src/plugins/plugin_misc_groupblog.py	Tue Jul 14 16:44:15 2015 +0200
@@ -508,7 +508,10 @@
                 - couple (comments data, RSM response data for the comments)
         """
         def comments_cb(comments_data, entry):
-            entry['comments_count'] = comments_data[1]['count']
+            try:
+                entry['comments_count'] = comments_data[1]['count']
+            except KeyError:  # target pubsub server probably doesn't handle RSM
+                pass
             return (entry, comments_data) if max_ > 0 else entry
 
         assert max_ >= 0