Modified:
trunk/doc/quickstart/testlibs/LoginLibrary.py
Log:
better way to handle possible spaces in sys.executable (which we now
ignore) and sut_path
Modified: trunk/doc/quickstart/testlibs/LoginLibrary.py
==============================================================================
--- trunk/doc/quickstart/testlibs/LoginLibrary.py (original)
+++ trunk/doc/quickstart/testlibs/LoginLibrary.py Tue Jan 13 07:39:43 2009
@@ -5,9 +5,8 @@
class LoginLibrary:
def __init__(self):
- sut_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
- '..', 'sut', 'login.py')
- self._command_prefix = '"%s" "%s" ' % (sys.executable, sut_path)
+ self._sut_path = os.path.join(os.path.dirname(__file__),
+ '..', 'sut', 'login.py')
self._status = ''
def create_user(self, username, password):
@@ -25,7 +24,7 @@
% (expected_status, self._status))
def _run_command(self, command, *args):
- command = '%s %s %s' % (self._command_prefix,
command, ' '.join(args))
+ command = '"%s" %s %s' % (self._sut_path, command, ' '.join(args))
process = os.popen(command)
self._status = process.read().strip()
process.close()