resolve merge mistakes (fixes #69)
This commit is contained in:
parent
7729d61d27
commit
9b0eb9911a
|
@ -214,27 +214,6 @@ class YowsupApp(object):
|
||||||
successFn, self.onUploadError, self.onUploadProgress, async=False)
|
successFn, self.onUploadError, self.onUploadProgress, async=False)
|
||||||
mediaUploader.start()
|
mediaUploader.start()
|
||||||
|
|
||||||
def onRequestUploadError(self, jid, path, errorRequestUploadIqProtocolEntity, requestUploadIqProtocolEntity):
|
|
||||||
self.logger.error("Request upload for file %s for %s failed" % (path, jid))
|
|
||||||
|
|
||||||
def onUploadError(self, filePath, jid, url):
|
|
||||||
#logger.error("Upload file %s to %s for %s failed!" % (filePath, url, jid))
|
|
||||||
self.logger.error("Upload Error!")
|
|
||||||
|
|
||||||
def onUploadProgress(self, filePath, jid, url, progress):
|
|
||||||
#sys.stdout.write("%s => %s, %d%% \r" % (os.path.basename(filePath), jid, progress))
|
|
||||||
#sys.stdout.flush()
|
|
||||||
pass
|
|
||||||
|
|
||||||
ownNumber = self.stack.getLayerInterface(YowAuthenticationProtocolLayer).getUsername(full=False)
|
|
||||||
|
|
||||||
mediaUploader = MediaUploader(jid, ownNumber, filePath,
|
|
||||||
resultRequestUploadIqProtocolEntity.getUrl(),
|
|
||||||
resultRequestUploadIqProtocolEntity.getResumeOffset(),
|
|
||||||
successFn, self.onUploadError, self.onUploadProgress, async=False)
|
|
||||||
|
|
||||||
mediaUploader.start()
|
|
||||||
|
|
||||||
def onRequestUploadError(self, jid, path, errorRequestUploadIqProtocolEntity, requestUploadIqProtocolEntity):
|
def onRequestUploadError(self, jid, path, errorRequestUploadIqProtocolEntity, requestUploadIqProtocolEntity):
|
||||||
self.logger.error("Request upload for file %s for %s failed" % (path, jid))
|
self.logger.error("Request upload for file %s for %s failed" % (path, jid))
|
||||||
|
|
||||||
|
@ -242,8 +221,7 @@ class YowsupApp(object):
|
||||||
self.logger.error("Upload file %s to %s for %s failed!" % (filePath, url, jid))
|
self.logger.error("Upload file %s to %s for %s failed!" % (filePath, url, jid))
|
||||||
|
|
||||||
def onUploadProgress(self, filePath, jid, url, progress):
|
def onUploadProgress(self, filePath, jid, url, progress):
|
||||||
#sys.stdout.write("%s => %s, %d%% \r" % (os.path.basename(filePath), jid, progress))
|
self.logger.info("%s => %s, %d%% \r" % (os.path.basename(filePath), jid, progress))
|
||||||
#sys.stdout.flush()
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def doSendImage(self, filePath, url, to, ip = None, caption = None, onSuccess = None, onFailure = None):
|
def doSendImage(self, filePath, url, to, ip = None, caption = None, onSuccess = None, onFailure = None):
|
||||||
|
|
Loading…
Reference in a new issue