Refactor to use new protocol module and sipo.
[bertos.git] / wizard / toolchain_validation.py
index e6386ee610796cb831b7ce577aed93c4e6af654b..a303a1b0e889826bd890831deb2d2eeb99e505af 100644 (file)
@@ -28,7 +28,6 @@
 #
 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
 #
-# $Id$
 #
 # Author: Lorenzo Berni <duplo@develer.com>
 #
@@ -45,7 +44,9 @@ def validateToolchain(toolchain):
     if not os.path.exists(toolchain):
         return {}
     for tool in TOOLCHAIN_ITEMS:
-        if not os.path.exists(toolchain.replace("gcc", tool)):
+        toolchainpre  = toolchain.rsplit("gcc", 1)[0]
+        toolchainpost = toolchain.rsplit("gcc", 1)[1]
+        if not os.path.exists(toolchainpre + tool + toolchainpost):
             return {}
     validation_process = QProcess()
     validation_process.start(toolchain, ["-v"])