[asterisk-commits] russell: testsuite/asterisk/trunk r184 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 2 14:38:11 CDT 2010


Author: russell
Date: Fri Apr  2 14:38:07 2010
New Revision: 184

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=184
Log:
Don't tie if we try to stop an Asterisk instance that is already gone

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=184&r1=183&r2=184
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Fri Apr  2 14:38:07 2010
@@ -115,9 +115,9 @@
         Example Usage:
         asterisk.stop()
         """
-        os.kill(self.process.pid, signal.SIGTERM)
-        time.sleep(5.0)
         try:
+            os.kill(self.process.pid, signal.SIGTERM)
+            time.sleep(5.0)
             if not self.process.poll():
                 os.kill(self.process.pid, signal.SIGKILL)
         except OSError:




More information about the asterisk-commits mailing list