Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0096.py @ 638:6821fc06a324
misc: a few "cosmetic" changes (PEP 8...)
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 05 Sep 2013 20:57:00 +0200 |
parents | 84a6e83157c2 |
children | 0077912bc9ba |
comparison
equal
deleted
inserted
replaced
637:3b02554d4c8b | 638:6821fc06a324 |
---|---|
293 sid, offer = self.host.plugins["XEP-0095"].proposeStream(jid.JID(to_jid), PROFILE, feature_elt, file_transfer_elts, profile_key=profile) | 293 sid, offer = self.host.plugins["XEP-0095"].proposeStream(jid.JID(to_jid), PROFILE, feature_elt, file_transfer_elts, profile_key=profile) |
294 offer.addCallback(self.fileCb, filepath, sid, size, profile) | 294 offer.addCallback(self.fileCb, filepath, sid, size, profile) |
295 return sid | 295 return sid |
296 | 296 |
297 def sendSuccessCb(self, sid, file_obj, stream_method, profile): | 297 def sendSuccessCb(self, sid, file_obj, stream_method, profile): |
298 info(_('Transfer %s successfuly finished [%s]') % (sid, profile)) | 298 info(_('Transfer %(sid)s successfuly finished [%(profile)s]') |
299 % {"sid": sid, "profile": profile}) | |
299 file_obj.close() | 300 file_obj.close() |
300 | 301 |
301 def sendFailureCb(self, sid, file_obj, stream_method, reason, profile): | 302 def sendFailureCb(self, sid, file_obj, stream_method, reason, profile): |
302 file_obj.close() | 303 file_obj.close() |
303 warning(_('Transfer %(id)s failed with stream method %(s_method)s: %(reason)s [%(profile)s') % {'id': sid, "s_method": stream_method, 'reason': reason, 'profile': profile}) | 304 warning(_('Transfer %(id)s failed with stream method %(s_method)s: %(reason)s [%(profile)s') % {'id': sid, "s_method": stream_method, 'reason': reason, 'profile': profile}) |