[asterisk-commits] pabelanger: testsuite/asterisk/trunk r855 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 17 16:08:46 CST 2010


Author: pabelanger
Date: Wed Nov 17 16:08:42 2010
New Revision: 855

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=855
Log:
Fix formatting issues

Thanks to Russell on #asterisk-testing

Modified:
    asterisk/trunk/lib/python/asterisk/asterisk.py
    asterisk/trunk/lib/python/asterisk/utils.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=855&r1=854&r2=855
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Wed Nov 17 16:08:42 2010
@@ -60,7 +60,7 @@
         self.ast_version = AsteriskVersion()
 
         self.astetcdir = "/etc/asterisk"
-	self.ast_binary = utils.which("asterisk") or "/usr/sbin/asterisk"
+        self.ast_binary = utils.which("asterisk") or "/usr/sbin/asterisk"
 
         # Find the system installed asterisk.conf
         ast_confs = [
@@ -113,7 +113,7 @@
             "-f", "-g", "-q", "-m", "-n",
             "-C", "%s" % os.path.join(self.astetcdir, "asterisk.conf")
         ]
-	try:
+    try:
             self.process = subprocess.Popen(cmd)
         except OSError:
             print "Failed to execute command: %s" % str(cmd)
@@ -192,7 +192,7 @@
         Keyword Arguments:
         cfg_path -- This argument must be the path to the configuration directory
         to be installed into this instance of Asterisk. Only top-level files will
-        be installed, sub directories will be ignored. 
+        be installed, sub directories will be ignored.
 
         Example Usage:
         asterisk.install_configs("tests/my-cool-test/configs")
@@ -210,7 +210,7 @@
         used only by this instance can be provided via this API call.
 
         Note: If a sub-directory is found to have the same name as the running
-        instance, install_config() will use the sub-directories version in place 
+        instance, install_config() will use the sub-directories version in place
         of the top-level version.
 
         For example, testsuite is running a test against 1.4 (branch-1.4):

Modified: asterisk/trunk/lib/python/asterisk/utils.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/utils.py?view=diff&rev=855&r1=854&r2=855
==============================================================================
--- asterisk/trunk/lib/python/asterisk/utils.py (original)
+++ asterisk/trunk/lib/python/asterisk/utils.py Wed Nov 17 16:08:42 2010
@@ -14,19 +14,19 @@
 
 
 def which(program):
-	'''
-	http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
-	'''
-	def is_exe(fpath):
-		return os.path.exists(fpath) and os.access(fpath, os.X_OK)
+    '''
+    http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
+    '''
+    def is_exe(fpath):
+        return os.path.exists(fpath) and os.access(fpath, os.X_OK)
 
-	fpath, fname = os.path.split(program)
-	if fpath:
-		if is_exe(program):
-			return program
-		else:
-			for path in os.environ["PATH"].split(os.pathsep):
-				exe_file = os.path.join(path, program)
-				if is_exe(exe_file):
-					return exe_file
-	return None
+    fpath, fname = os.path.split(program)
+    if fpath:
+        if is_exe(program):
+            return program
+        else:
+            for path in os.environ["PATH"].split(os.pathsep):
+                exe_file = os.path.join(path, program)
+                if is_exe(exe_file):
+                    return exe_file
+    return None




More information about the asterisk-commits mailing list