[robotframework commit] r1271 - trunk/doc/quickstart/testlibs

4 views
Skip to first unread message

codesite...@google.com

unread,
Jan 13, 2009, 10:59:07 AM1/13/09
to robotframe...@googlegroups.com
Author: jprantan
Date: Tue Jan 13 07:39:43 2009
New Revision: 1271

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()

Reply all
Reply to author
Forward
0 new messages