comparison libervia/backend/plugins/plugin_blog_import.py @ 4341:e9971a4b0627

remove uses of twisted.internet.defer.returnValue This function has been deprecated in Twisted 24.7.0.
author Povilas Kanapickas <povilas@radix.lt>
date Wed, 11 Dec 2024 01:17:09 +0200
parents 4b842c1fb686
children
comparison
equal deleted inserted replaced
4340:ea72364131d5 4341:e9971a4b0627
139 recurse_kwargs = { 139 recurse_kwargs = {
140 "items_import_data": item_import_data["comments"][0], 140 "items_import_data": item_import_data["comments"][0],
141 "service": comments_service, 141 "service": comments_service,
142 "node": comments_node, 142 "node": comments_node,
143 } 143 }
144 defer.returnValue(recurse_kwargs) 144 return recurse_kwargs
145 else: 145 else:
146 if item_import_data["comments"][0]: 146 if item_import_data["comments"][0]:
147 raise exceptions.DataError( 147 raise exceptions.DataError(
148 "allow_comments set to False, but comments are there" 148 "allow_comments set to False, but comments are there"
149 ) 149 )
150 defer.returnValue(None) 150 return None
151 151
152 def publish_item(self, client, mb_data, service, node, session): 152 def publish_item(self, client, mb_data, service, node, session):
153 log.debug( 153 log.debug(
154 "uploading item [{id}]: {title}".format( 154 "uploading item [{id}]: {title}".format(
155 id=mb_data["id"], title=mb_data.get("title", "") 155 id=mb_data["id"], title=mb_data.get("title", "")