From e8ece28f0006f1d8af5d064898b1e635afb0cb5f Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Thu, 22 Feb 2007 18:32:05 +0100 Subject: [PATCH] Set public JCLComponent.send_error method darcs-hash:20070222173205-86b55-d14f1d840e5ce83cd67a20afdbbc8d23b1907057.gz --- src/jcl/jabber/component.py | 2 +- tests/jcl/jabber/test_component.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jcl/jabber/component.py b/src/jcl/jabber/component.py index 7087b0c..d55d807 100644 --- a/src/jcl/jabber/component.py +++ b/src/jcl/jabber/component.py @@ -721,7 +721,7 @@ class JCLComponent(Component, object): (_account.name)) self.stream.send(msg) - def _send_error(self, _account, exception): + def send_error(self, _account, exception): """Send an error message only one time until _account.in_error has been reset to False""" if _account.in_error == False: diff --git a/tests/jcl/jabber/test_component.py b/tests/jcl/jabber/test_component.py index f177b3c..28e6402 100644 --- a/tests/jcl/jabber/test_component.py +++ b/tests/jcl/jabber/test_component.py @@ -1845,7 +1845,7 @@ class JCLComponent_TestCase(unittest.TestCase): name = "account11", \ jid = "account11@jcl.test.com") exception = Exception("test exception") - self.comp._send_error(_account, exception) + self.comp.send_error(_account, exception) self.assertEqual(len(self.comp.stream.sent), 1) error_sent = self.comp.stream.sent[0] self.assertEqual(error_sent.get_to(), _account.user_jid) @@ -1865,5 +1865,5 @@ class JCLComponent_TestCase(unittest.TestCase): jid = "account11@jcl.test.com") _account.in_error = True exception = Exception("test exception") - self.comp._send_error(_account, exception) + self.comp.send_error(_account, exception) self.assertEqual(len(self.comp.stream.sent), 0)