# HG changeset patch # User Goffi # Date 1447787931 -3600 # Node ID a17a91531fbe77e779c2b8868be2bc63d193df01 # Parent 4dd07d0262144f069a5eba39c83446c8ef79c943 jp (file): print a message and quit if progress_id is not received diff -r 4dd07d026214 -r a17a91531fbe frontends/src/jp/cmd_file.py --- 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)