[asterisk-commits] kmoore: testsuite/asterisk/trunk r3701 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 12 16:03:18 CDT 2013


Author: kmoore
Date: Fri Apr 12 16:03:14 2013
New Revision: 3701

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3701
Log:
Catch developer error and report it so it can be found

Modified:
    asterisk/trunk/lib/python/asterisk/ami.py

Modified: asterisk/trunk/lib/python/asterisk/ami.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/ami.py?view=diff&rev=3701&r1=3700&r2=3701
==============================================================================
--- asterisk/trunk/lib/python/asterisk/ami.py (original)
+++ asterisk/trunk/lib/python/asterisk/ami.py Fri Apr 12 16:03:14 2013
@@ -248,6 +248,10 @@
         callback_module = __import__(self.callback_module)
         method = getattr(callback_module, self.callback_method)
         self.passed = method(ami, event)
+        if self.passed == None:
+            logger.error("Callback %s.%s returned None instead of a boolean" %
+                (self.callback_module, self.callback_method))
+            self.passed = False
 
     def check_result(self, callback_param):
         self.test_object.set_passed(self.passed)




More information about the asterisk-commits mailing list