[CalendarServer-changes] [7364] CalendarServer/trunk/calendarserver/tools/test

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 27 11:04:16 PDT 2011


Revision: 7364
          http://trac.macosforge.org/projects/calendarserver/changeset/7364
Author:   cdaboo at apple.com
Date:     2011-04-27 11:04:16 -0700 (Wed, 27 Apr 2011)
Log Message:
-----------
Use sys.executable not hard-coded python paths.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
    CalendarServer/trunk/calendarserver/tools/test/test_principals.py

Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py	2011-04-27 17:33:02 UTC (rev 7363)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py	2011-04-27 18:04:16 UTC (rev 7364)
@@ -15,6 +15,7 @@
 ##
 
 import os
+import sys
 from twext.python.plistlib import readPlistFromString
 import xml
 
@@ -81,7 +82,7 @@
             command = command.encode("utf-8")
 
         sourceRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
-        python = os.path.join(sourceRoot, "python")
+        python = sys.executable
         gateway = os.path.join(sourceRoot, "bin", "calendarserver_command_gateway")
 
         args = [python, gateway, "-f", self.configFileName]

Modified: CalendarServer/trunk/calendarserver/tools/test/test_principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_principals.py	2011-04-27 17:33:02 UTC (rev 7363)
+++ CalendarServer/trunk/calendarserver/tools/test/test_principals.py	2011-04-27 18:04:16 UTC (rev 7364)
@@ -15,6 +15,7 @@
 ##
 
 import os
+import sys
 
 from twext.python.filepath import CachingFilePath as FilePath
 from twisted.internet import reactor
@@ -83,7 +84,7 @@
         Run calendarserver_manage_principals, passing additional as args.
         """
         sourceRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
-        python = os.path.join(sourceRoot, "python")
+        python = sys.executable
         script = os.path.join(sourceRoot, "bin", "calendarserver_manage_principals")
 
         args = [python, script, "-f", self.configFileName]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110427/c8e558a6/attachment.html>


More information about the calendarserver-changes mailing list