Mercurial > libervia-backend
diff src/plugins/plugin_misc_file.py @ 2148:a543eda2c923
core (memory/disco): getInfos now handle node + use client instead of profile in many methods
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 12 Feb 2017 20:43:20 +0100 |
parents | 33c8c4973743 |
children | 8b37a62336c3 |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_file.py Sun Feb 12 19:23:34 2017 +0100 +++ b/src/plugins/plugin_misc_file.py Sun Feb 12 20:43:20 2017 +0100 @@ -211,12 +211,13 @@ @param profile: %(doc_profile)s @return (dict): action dictionary, with progress id in case of success, else xmlui message """ + client = self.host.getClient(profile) if not os.path.isfile(filepath): raise exceptions.DataError(u"The given path doesn't link to a file") if not filename: filename = os.path.basename(filepath) or '_' for namespace, callback, priority, method_name in self._file_callbacks: - has_feature = yield self.host.hasFeature(namespace, peer_jid, profile) + has_feature = yield self.host.hasFeature(client, namespace, peer_jid) if has_feature: log.info(u"{name} method will be used to send the file".format(name=method_name)) progress_id = yield callback(peer_jid, filepath, filename, file_desc, profile)