diff src/plugins/plugin_xep_0047.py @ 1583:d46aae87c03a

plugins XEP-0047, XEP-0065, XEP-0096: fixed use of failure.condition insteand of failure.value + removed gettext use for local logs
author Goffi <goffi@goffi.org>
date Fri, 13 Nov 2015 16:46:31 +0100
parents 7fef6cdf5953
children e9936fcfaf91
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0047.py	Fri Nov 13 16:45:56 2015 +0100
+++ b/src/plugins/plugin_xep_0047.py	Fri Nov 13 16:46:31 2015 +0100
@@ -82,7 +82,7 @@
         @param sid(unicode): session id of client.xep_0047_current_stream
         @param client: %(doc_client)s
         """
-        log.info(_("In-Band Bytestream: TimeOut reached for id {sid} [{profile}]")
+        log.info(u"In-Band Bytestream: TimeOut reached for id {sid} [{profile}]"
                  .format(sid=sid, profile=client.profile))
         self._killSession(sid, client, "TIMEOUT")
 
@@ -97,7 +97,7 @@
         try:
             session = client.xep_0047_current_stream[sid]
         except KeyError:
-            log.warning(_("kill id called on a non existant id"))
+            log.warning(u"kill id called on a non existant id")
             return
 
         try:
@@ -331,9 +331,9 @@
 
     def _IQDataStreamEb(self, failure, session_data, client):
         if failure.check(error.StanzaError):
-            log.warning(u"IBB transfer failed: {}".format(failure.condition))
+            log.warning(u"IBB transfer failed: {}".format(failure.value))
         else:
-            log.error(u"IBB transfer failed: {}".format(failure.condition))
+            log.error(u"IBB transfer failed: {}".format(failure.value))
         self.terminateStream(session_data, client, "IQ_ERROR")
 
     def terminateStream(self, session_data, client, failure_reason=None):