[asterisk-commits] mjordan: testsuite/asterisk/trunk r2223 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 14 15:26:31 CDT 2011
Author: mjordan
Date: Wed Sep 14 15:26:29 2011
New Revision: 2223
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2223
Log:
Added try / except around the fileConfig to support older versions of python
Modified:
asterisk/trunk/lib/python/asterisk/TestCase.py
Modified: asterisk/trunk/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/TestCase.py?view=diff&rev=2223&r1=2222&r2=2223
==============================================================================
--- asterisk/trunk/lib/python/asterisk/TestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/TestCase.py Wed Sep 14 15:26:29 2011
@@ -52,7 +52,11 @@
""" Set up logging """
logConfigFile = os.path.join(os.getcwd(), "%s" % (self.defaultLogFileName))
if os.path.exists(logConfigFile):
- logging.config.fileConfig(logConfigFile, None, False)
+ try:
+ logging.config.fileConfig(logConfigFile, None, False)
+ except:
+ print "WARNING: failed to preserve existing loggers - some logging statements may be missing"
+ logging.config.fileConfig(logConfigFile)
else:
print "WARNING: no logging.conf file found; using default configuration"
logging.basicConfig(level=self.defaultLogLevel)
More information about the asterisk-commits
mailing list