diff --git a/sat/plugins/plugin_misc_upload.py b/sat/plugins/plugin_misc_upload.py index 759b72f5..86b8b4e4 100644 --- a/sat/plugins/plugin_misc_upload.py +++ b/sat/plugins/plugin_misc_upload.py @@ -80,7 +80,6 @@ class UploadPlugin(object): @return (dict): action dictionary, with progress id in case of success, else xmlui message """ - try: progress_id, __ = await self.upload( client, filepath, filename, upload_jid, options) @@ -123,10 +122,11 @@ class UploadPlugin(object): if not os.path.isfile(filepath): raise exceptions.DataError("The given path doesn't link to a file") for method_name, available_cb, upload_cb, priority in self._upload_callbacks: - try: - upload_jid = await available_cb(client, upload_jid) - except exceptions.NotFound: - continue # no entity managing this extension found + if upload_jid is None: + try: + upload_jid = await available_cb(client, upload_jid) + except exceptions.NotFound: + continue # no entity managing this extension found log.info( "{name} method will be used to upload the file".format(name=method_name)