diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/xmpp/dispatcher.py | 4 | ||||
-rw-r--r-- | src/common/xmpp/dispatcher_nb.py | 4 | ||||
-rw-r--r-- | src/common/xmpp/session.py | 6 | ||||
-rw-r--r-- | src/common/xmpp/simplexml.py | 2 | ||||
-rw-r--r-- | src/common/xmpp/transports.py | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/common/xmpp/dispatcher.py b/src/common/xmpp/dispatcher.py index d8fb4a58b..31933ace2 100644 --- a/src/common/xmpp/dispatcher.py +++ b/src/common/xmpp/dispatcher.py @@ -49,7 +49,7 @@ class Dispatcher(PlugIn): def getAnID(self): global ID ID+=1 - return `ID` + return repr(ID) def dumpHandlers(self): """ Return set of user-registered callbacks in it's internal format. @@ -359,7 +359,7 @@ class Dispatcher(PlugIn): elif not stanza.getID(): global ID ID+=1 - _ID=`ID` + _ID=repr(ID) stanza.setID(_ID) else: _ID=stanza.getID() if self._owner._registered_name and not stanza.getAttr('from'): stanza.setAttr('from',self._owner._registered_name) diff --git a/src/common/xmpp/dispatcher_nb.py b/src/common/xmpp/dispatcher_nb.py index 98cd77770..16838560f 100644 --- a/src/common/xmpp/dispatcher_nb.py +++ b/src/common/xmpp/dispatcher_nb.py @@ -53,7 +53,7 @@ class Dispatcher(PlugIn): def getAnID(self): global ID ID += 1 - return `ID` + return repr(ID) def dumpHandlers(self): ''' Return set of user-registered callbacks in it's internal format. @@ -411,7 +411,7 @@ class Dispatcher(PlugIn): elif not stanza.getID(): global ID ID+=1 - _ID=`ID` + _ID=repr(ID) stanza.setID(_ID) else: _ID=stanza.getID() diff --git a/src/common/xmpp/session.py b/src/common/xmpp/session.py index 7f034db07..28f2f0bdc 100644 --- a/src/common/xmpp/session.py +++ b/src/common/xmpp/session.py @@ -85,7 +85,7 @@ class Session: self.DEBUG=owner.Dispatcher.DEBUG self._expected={} self._owner=owner - if self.TYP=='server': self.ID=`random.random()`[2:] + if self.TYP=='server': self.ID=repr(random.random())[2:] else: self.ID=None self.sendbuffer='' @@ -128,7 +128,7 @@ class Session: except: received = '' if len(received): # length of 0 means disconnect - self.DEBUG(`self.fileno()`+' '+received,'got') + self.DEBUG(repr(self.fileno())+' '+received,'got') else: self.DEBUG('Socket error while receiving data','error') self.set_socket_state(SOCKET_DEAD) @@ -189,7 +189,7 @@ class Session: self.set_socket_state(SOCKET_DEAD) self.DEBUG("Socket error while sending data",'error') return self.terminate_stream() - self.DEBUG(`self.fileno()`+' '+self.sendbuffer[:sent],'sent') + self.DEBUG(repr(self.fileno())+' '+self.sendbuffer[:sent],'sent') self._stream_pos_sent+=sent self.sendbuffer=self.sendbuffer[sent:] self._stream_pos_delivered=self._stream_pos_sent # Should be acquired from socket somehow. Take SSL into account. diff --git a/src/common/xmpp/simplexml.py b/src/common/xmpp/simplexml.py index 515da3ba0..7458568e4 100644 --- a/src/common/xmpp/simplexml.py +++ b/src/common/xmpp/simplexml.py @@ -363,7 +363,7 @@ class NodeBuilder: """XML Parser callback. Used internally""" self.check_data_buffer() self._inc_depth() - self.DEBUG(DBG_NODEBUILDER, "DEPTH -> %i , tag -> %s, attrs -> %s" % (self.__depth, tag, `attrs`), 'down') + self.DEBUG(DBG_NODEBUILDER, "DEPTH -> %i , tag -> %s, attrs -> %s" % (self.__depth, tag, repr(attrs)), 'down') if self.__depth == self._dispatch_depth: if not self._mini_dom : self._mini_dom = Node(tag=tag, attrs=attrs, nsp = self._document_nsp, node_built=True) diff --git a/src/common/xmpp/transports.py b/src/common/xmpp/transports.py index e5c04a2f9..3df6e2d2a 100644 --- a/src/common/xmpp/transports.py +++ b/src/common/xmpp/transports.py @@ -103,7 +103,7 @@ class TCPsocket(PlugIn): self._sock.connect(ai[4]) self._send=self._sock.sendall self._recv=self._sock.recv - self.DEBUG("Successfully connected to remote host %s"%`server`,'start') + self.DEBUG("Successfully connected to remote host %s"%repr(server),'start') return 'ok' except: continue except: pass |