Remove trailing whitespaces.

This commit is contained in:
Emmanuel Gil Peyrot 2013-01-18 17:55:34 +01:00
commit 27b3592e16

View file

@ -57,9 +57,9 @@ class Exp_Pipe():
def profileConnected(self, profile):
client = self.host.getClient(profile)
client._pipe_waiting_for_approval = {} #key = id, value = [transfer data, IdelayedCall Reactor timeout,
client._pipe_waiting_for_approval = {} #key = id, value = [transfer data, IdelayedCall Reactor timeout,
# current stream method, [failed stream methods], profile]
def _kill_id(self, approval_id, profile):
"""Delete a waiting_for_approval id, called after timeout
@param approval_id: id of _pipe_waiting_for_approval"""
@ -69,7 +69,7 @@ class Exp_Pipe():
del client._pipe_waiting_for_approval[approval_id]
except KeyError:
warning(_("kill id called on a non existant approval id"))
def transferRequest(self, iq_id, from_jid, si_id, si_mime_type, si_el, profile):
"""Called when a pipe transfer is requested
@param iq_id: id of the iq request
@ -85,12 +85,12 @@ class Exp_Pipe():
raise ProfileNotInCacheError
pipe_elts = filter(lambda elt: elt.name == 'pipe', si_el.elements())
feature_elts = self.host.plugins["XEP-0020"].getFeatureElt(si_el)
if not pipe_elts:
warning(_("No pipe element found"))
self.host.plugins["XEP-0095"].sendBadRequestError(iq_id, from_jid, profile)
return
if feature_elts:
feature_el = feature_elts[0]
form = data_form.Form.fromElement(feature_el.firstChildElement())
@ -202,7 +202,7 @@ class Exp_Pipe():
if not feature_elts:
warning(_("No feature element"))
return
choosed_options = self.host.plugins["XEP-0020"].getChoosedOptions(feature_elts[0])
try:
stream_method = choosed_options["stream-method"]
@ -236,9 +236,9 @@ class Exp_Pipe():
warning(_("Trying to send a file from an unknown profile"))
return ""
feature_elt = self.host.plugins["XEP-0020"].proposeFeatures({'stream-method': self.managed_stream_m})
pipe_transfer_elts = []
pipe_elt = domish.Element((PROFILE, 'pipe'))
pipe_transfer_elts.append(pipe_elt)