changeset 3721:6878745a47e8

component file sharing: fix incorrect use of `returnValue` in `items` async method
author Goffi <goffi@goffi.org>
date Tue, 25 Jan 2022 17:13:32 +0100
parents 40a6374fcd44
children 75f8d206e551
files sat/plugins/plugin_comp_file_sharing.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_file_sharing.py	Tue Jan 25 17:09:54 2022 +0100
+++ b/sat/plugins/plugin_comp_file_sharing.py	Tue Jan 25 17:13:32 2022 +0100
@@ -814,7 +814,7 @@
                 continue
 
     def _getFrom(self, item_elt):
-        """retrieve published of an item
+        """retrieve publisher of an item
 
         @param item_elt(domish.element): <item> element
         @return (unicode): full jid as string
@@ -845,9 +845,7 @@
         file_data = await self.getFileData(requestor, nodeIdentifier)
         comments = file_data["extra"].get("comments", [])
         if itemIdentifiers:
-            defer.returnValue(
-                [generic.parseXml(c[2]) for c in comments if c[0] in itemIdentifiers]
-            )
+            return [generic.parseXml(c[2]) for c in comments if c[0] in itemIdentifiers]
         else:
             return [generic.parseXml(c[2]) for c in comments]