fix issue with sequence of multiple whitespaces in makefile command
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 14 Oct 2016 18:04:22 +0300
changeset 1543 61f0f31ef296
parent 1542 0535a6b50534
child 1544 2969c2123105
fix issue with sequence of multiple whitespaces in makefile command
line from project configuration

for every additional whitespace '""' was inserted in result command line.
targets/toolchain_makefile.py
--- a/targets/toolchain_makefile.py	Fri Oct 14 14:03:38 2016 +0300
+++ b/targets/toolchain_makefile.py	Fri Oct 14 18:04:22 2016 +0300
@@ -122,7 +122,10 @@
                               "buildpath": self.buildpath
                              }
             
-            command = [ token % beremizcommand for token in target.getCommand().split(' ')]
+            # clean sequence of multiple whitespaces 
+            cmd = re.sub(r"[ ]+", " ", target.getCommand())
+
+            command = [ token % beremizcommand for token in cmd.split(' ')]
 
             # Call Makefile to build PLC code and link it with target specific code
             status, result, err_result = ProcessLogger(self.CTRInstance.logger,