debug xml data

This commit is contained in:
Dimitur Kirov 2006-09-19 17:58:29 +00:00
parent 884e66e5d7
commit 1f836cae67
1 changed files with 3 additions and 1 deletions

View File

@ -292,6 +292,8 @@ class P2PConnection(IdleObject, PlugIn):
if self.state < 0: if self.state < 0:
return return
if self.on_receive: if self.on_receive:
if received.strip():
self.DEBUG(received, 'got')
if hasattr(self._owner, 'Dispatcher'): if hasattr(self._owner, 'Dispatcher'):
self._owner.Dispatcher.Event('', DATA_RECEIVED, received) self._owner.Dispatcher.Event('', DATA_RECEIVED, received)
self.on_receive(received) self.on_receive(received)
@ -372,7 +374,7 @@ class P2PConnection(IdleObject, PlugIn):
def _on_send(self): def _on_send(self):
if self.sent_data and self.sent_data.strip(): if self.sent_data and self.sent_data.strip():
#~ self.DEBUG(self.sent_data,'sent') self.DEBUG(self.sent_data,'sent')
if hasattr(self._owner, 'Dispatcher'): if hasattr(self._owner, 'Dispatcher'):
self._owner.Dispatcher.Event('', DATA_SENT, self.sent_data) self._owner.Dispatcher.Event('', DATA_SENT, self.sent_data)
self.sent_data = None self.sent_data = None