comparison src/plugins/plugin_blog_import.py @ 1852:569c48e4cf0d

plugin blog import: mb_data handle unicode only, so comments_service must be a unicode and not a JID
author Goffi <goffi@goffi.org>
date Wed, 24 Feb 2016 16:11:36 +0100
parents 489b968b3723
children 2daf7b4c6756
comparison
equal deleted inserted replaced
1851:ff603003d40a 1852:569c48e4cf0d
200 if len(data['comments']) != 1: 200 if len(data['comments']) != 1:
201 raise NotImplementedError(u"can't manage multiple comment links") 201 raise NotImplementedError(u"can't manage multiple comment links")
202 allow_comments = C.bool(mb_data.get('allow_comments', C.BOOL_FALSE)) 202 allow_comments = C.bool(mb_data.get('allow_comments', C.BOOL_FALSE))
203 if allow_comments: 203 if allow_comments:
204 comments_service, comments_node = self._m.getCommentsService(client), self._m.getCommentsNode(item_id) 204 comments_service, comments_node = self._m.getCommentsService(client), self._m.getCommentsNode(item_id)
205 mb_data['comments_service'] = comments_service 205 mb_data['comments_service'] = comments_service.full()
206 mb_data['comments_node'] = comments_node 206 mb_data['comments_node'] = comments_node
207 else: 207 else:
208 if data['comments'][0]: 208 if data['comments'][0]:
209 raise exceptions.DataError(u"allow_comments set to False, but comments are there") 209 raise exceptions.DataError(u"allow_comments set to False, but comments are there")
210 210