[asterisk-commits] mjordan: testsuite/asterisk/trunk r4069 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Aug 25 16:18:38 CDT 2013


Author: mjordan
Date: Sun Aug 25 16:18:36 2013
New Revision: 4069

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4069
Log:
Catch exceptions in CDR checking

Sometimes things go wrong. For example, sometimes there isn't a CDR file
isn't created. That causes all sorts of odd errors. Other times, things
just aren't coded correctly.

Since this typically happens during shutdown of Asterisk/twisted reactor,
having these exceptions propagate any further than the CDR module that
starts the checking has been a "bad thing". This catches those errors so
that things will at least finish.

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

Modified: asterisk/trunk/lib/python/asterisk/cdr.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/cdr.py?view=diff&rev=4069&r1=4068&r2=4069
==============================================================================
--- asterisk/trunk/lib/python/asterisk/cdr.py (original)
+++ asterisk/trunk/lib/python/asterisk/cdr.py Sun Aug 25 16:18:36 2013
@@ -61,7 +61,10 @@
         callback_param
         '''
         LOGGER.debug("Checking CDR records...")
-        self.match_cdrs()
+        try:
+            self.match_cdrs()
+        except:
+            LOGGER.error("Excpetion while checking CDRs: %s" % sys.exc_info()[0])
         return callback_param
 
 




More information about the asterisk-commits mailing list