Mercurial > libervia-backend
changeset 1621:a17a91531fbe
jp (file): print a message and quit if progress_id is not received
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Nov 2015 20:18:51 +0100 |
parents | 4dd07d026214 |
children | 5b24d6bf5d15 |
files | frontends/src/jp/cmd_file.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_file.py Tue Nov 17 20:13:27 2015 +0100 +++ b/frontends/src/jp/cmd_file.py Tue Nov 17 20:18:51 2015 +0100 @@ -59,7 +59,12 @@ """ #FIXME: this show progress only for last progress_id self.disp(_(u"File request sent to {jid}".format(jid=self.full_dest_jid)), 1) - self.progress_id = data['progress'] + try: + self.progress_id = data['progress'] + except KeyError: + # TODO: if 'xmlui' key is present, manage xmlui message display + self.disp(_(u"Can't send file to {jid}".format(jid=self.full_dest_jid)), error=True) + self.host.quit(2) def error(self, failure): self.disp(_("Error while trying to send a file: {reason}").format(reason=failure), error=True)