Title: [commits] (bear) [16041] Tweaked the code that determines which RunPython to use
Revision
16041
Author
bear
Date
2007-12-04 11:17:20 -0800 (Tue, 04 Dec 2007)

Log Message

Tweaked the code that determines which RunPython to use
(debug or release) to look for the RunPython script
as well as the release/debug directory
Thanks RobinD for pointing this one out

Modified Paths

Diff

Modified: trunk/chandler/tools/createBase.py (16040 => 16041)

--- trunk/chandler/tools/createBase.py	2007-12-04 18:19:51 UTC (rev 16040)
+++ trunk/chandler/tools/createBase.py	2007-12-04 19:17:20 UTC (rev 16041)
@@ -54,11 +54,16 @@
             self.CHANDLERHOME = getCommand(['cygpath', '-a', self.CHANDLERHOME])
             self.CHANDLERBIN  = getCommand(['cygpath', '-a', self.CHANDLERBIN])
 
+        if isWindows:
+            pyScript = 'RunPython.bat'
+        else:
+            pyScript = 'RunPython'
+
         try:
-            if "release" in os.listdir(self.CHANDLERBIN):
+            if "release" in os.listdir(self.CHANDLERBIN) and os.path.exists(os.path.join(self.CHANDLERBIN, "release", pyScript)):
                 self.BINROOT = os.path.join(self.CHANDLERBIN, "release")
 
-            elif "debug" in os.listdir(self.CHANDLERBIN):
+            elif "debug" in os.listdir(self.CHANDLERBIN) and os.path.exists(os.path.join(self.CHANDLERBIN, "debug", pyScript)):
                 self.BINROOT = os.path.join(self.CHANDLERBIN, "debug")
 
             else:
@@ -66,10 +71,7 @@
         except:
             self.raiseError("CHANDLERBIN is invalid '%s'." % self.CHANDLERBIN)
 
-        if isWindows:
-            self.PYTHON = os.path.join(self.BINROOT, "RunPython.bat")
-        else:
-            self.PYTHON = os.path.join(self.BINROOT, "RunPython")
+        self.PYTHON = os.path.join(self.BINROOT, pyScript)
 
     def checkPOFile(self, poFileName):
         try:




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to