Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -57,9 +57,9 @@ class XEP_0096():
|
|||
|
||||
def profileConnected(self, profile):
|
||||
client = self.host.getClient(profile)
|
||||
client._xep_0096_waiting_for_approval = {} #key = id, value = [transfer data, IdelayedCall Reactor timeout,
|
||||
client._xep_0096_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 _xep_0096_waiting_for_approval"""
|
||||
|
|
@ -69,7 +69,7 @@ class XEP_0096():
|
|||
del client._xep_0096_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 file transfer is requested
|
||||
@param iq_id: id of the iq request
|
||||
|
|
@ -91,7 +91,7 @@ class XEP_0096():
|
|||
can_range = False
|
||||
file_elts = filter(lambda elt: elt.name == 'file', si_el.elements())
|
||||
feature_elts = self.host.plugins["XEP-0020"].getFeatureElt(si_el)
|
||||
|
||||
|
||||
if file_elts:
|
||||
file_el = file_elts[0]
|
||||
filename = file_el["name"]
|
||||
|
|
@ -108,7 +108,7 @@ class XEP_0096():
|
|||
warning(_("No file 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())
|
||||
|
|
@ -238,7 +238,7 @@ class XEP_0096():
|
|||
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"]
|
||||
|
|
@ -281,9 +281,9 @@ class XEP_0096():
|
|||
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})
|
||||
|
||||
|
||||
file_transfer_elts = []
|
||||
|
||||
|
||||
statinfo = os.stat(filepath)
|
||||
file_elt = domish.Element((PROFILE, 'file'))
|
||||
file_elt['name']=os.path.basename(filepath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue