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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 31 02:44:24 CDT 2010


Author: russell
Date: Wed Mar 31 02:44:23 2010
New Revision: 163

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=163
Log:
Re-do stopping Asterisk to not require python 2.6 for now ...

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=163&r1=162&r2=163
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Wed Mar 31 02:44:23 2010
@@ -113,14 +113,22 @@
         Example Usage:
         asterisk.stop()
         """
-        self.process.terminate()
-        time.sleep(5.0)
         try:
-            if not self.process.poll():
-                self.process.kill()
+            self.cli_exec("core stop now")
         except OSError:
             pass
-        (self.stdout, self.stderr) = self.process.communicate()
+        self.process.wait()
+        #
+        # Requires Python 2.6 :-(
+        #
+        # self.process.terminate()
+        # time.sleep(5.0)
+        # try:
+        #     if not self.process.poll():
+        #         self.process.kill()
+        # except OSError:
+        #     pass
+        # (self.stdout, self.stderr) = self.process.communicate()
         return self.process.returncode
 
     def install_config(self, cfg_path):




More information about the svn-commits mailing list