Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -135,8 +135,8 @@ class JP():
|
|||
self.start_loop = True #We have to use loop for these options
|
||||
else:
|
||||
self.start_loop = False
|
||||
|
||||
|
||||
|
||||
|
||||
return args
|
||||
|
||||
def check_jabber_status(self):
|
||||
|
|
@ -145,7 +145,7 @@ class JP():
|
|||
error(_(u"Can't connect profile"))
|
||||
exit(1)
|
||||
|
||||
|
||||
|
||||
self.profile = self.bridge.getProfileName(self.options.profile)
|
||||
if not self.profile:
|
||||
error(_("The profile asked doesn't exist"))
|
||||
|
|
@ -293,7 +293,7 @@ class JP():
|
|||
return
|
||||
if self.dest_jids and not JID(data['from']).short in [JID(_jid).short for _jid in self.dest_jids]:
|
||||
return #file is not sent by a filtered jid
|
||||
|
||||
|
||||
answer_data["dest_path"] = os.getcwd()+'/'+data['filename']
|
||||
|
||||
if self.options.force or not os.path.exists(answer_data["dest_path"]):
|
||||
|
|
@ -303,7 +303,7 @@ class JP():
|
|||
else:
|
||||
self.bridge.confirmationAnswer(confirm_id, False, answer_data, profile)
|
||||
warning(_("Refused file [%(filename)s] from %(sender)s: a file with the same name already exist") % {'filename':data['filename'], 'sender':data['from']})
|
||||
|
||||
|
||||
|
||||
if not self.options.multiple and not self.options.progress:
|
||||
#we just accept one file
|
||||
|
|
@ -313,7 +313,7 @@ class JP():
|
|||
return
|
||||
if self.dest_jids and not JID(data['from']).short in [JID(_jid).short for _jid in self.dest_jids]:
|
||||
return #pipe stream is not sent by a filtered jid
|
||||
|
||||
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
fifopath = os.path.join(tmp_dir,"pipe_in")
|
||||
answer_data["dest_path"] = fifopath
|
||||
|
|
@ -323,8 +323,8 @@ class JP():
|
|||
shutil.copyfileobj(f, sys.stdout)
|
||||
shutil.rmtree(tmp_dir)
|
||||
self.loop.quit()
|
||||
|
||||
|
||||
|
||||
|
||||
def actionResult(self, action_type, action_id, data, profile):
|
||||
#FIXME
|
||||
info (_("FIXME: actionResult not implemented"))
|
||||
|
|
@ -333,7 +333,7 @@ class JP():
|
|||
"""Auto reply to confirmations requests"""
|
||||
#we register incoming confirmation
|
||||
self.bridge.register("askConfirmation", self.askConfirmation)
|
||||
|
||||
|
||||
#and we ask those we have missed
|
||||
for confirm_id, confirm_type, data in self.bridge.getWaitingConf(self.profile):
|
||||
self.askConfirmation(confirm_id, confirm_type, data, self.profile)
|
||||
|
|
@ -349,7 +349,7 @@ class JP():
|
|||
#first answer, we must construct the bar
|
||||
self.pbar = ProgressBar(int(data['size']),[_("Progress: "),Percentage()," ",Bar()," ",FileTransferSpeed()," ",ETA()])
|
||||
self.pbar.start()
|
||||
|
||||
|
||||
self.pbar.update(int(data['position']))
|
||||
elif self.pbar:
|
||||
self.pbar.finish()
|
||||
|
|
|
|||
Loading…
Reference in a new issue