[svn-commits] mjordan: testsuite/asterisk/trunk r2538 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Oct 12 12:21:37 CDT 2011
Author: mjordan
Date: Wed Oct 12 12:21:33 2011
New Revision: 2538
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2538
Log:
Flag an error in the logger if the Asterisk instance can't be polled after 5 seconds
Modified:
asterisk/trunk/lib/python/asterisk/asterisk.py
Modified: asterisk/trunk/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/asterisk.py?view=diff&rev=2538&r1=2537&r2=2538
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Wed Oct 12 12:21:33 2011
@@ -129,6 +129,13 @@
# Be _really_ sure that Asterisk has started up before returning.
time.sleep(5.0)
+
+ # Poll the instance to make sure we created it successfully
+ self.process.poll()
+ if self.process.returncode != None:
+ """ Rut roh, Asterisk process exited prematurely """
+ logger.error("Asterisk instance %s exited prematurely with return code %d" % self.host, self.process.returncode)
+
self.cli_exec("core waitfullybooted")
def stop(self):
More information about the svn-commits
mailing list