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)