merge svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 15 Jan 2021 10:15:41 +0100
branchsvghmi
changeset 3110 476bd870313d
parent 3108 079419e7228d (current diff)
parent 3109 6c39d718e8cb (diff)
child 3111 5d9ae04ee50f
merge
--- a/ProjectController.py	Fri Jan 15 10:11:05 2021 +0100
+++ b/ProjectController.py	Fri Jan 15 10:15:41 2021 +0100
@@ -159,6 +159,7 @@
                                                          no_stdout=True,
                                                          no_stderr=True).spin()
         except Exception:
+            self.logger.write_error(_("Couldn't launch IEC compiler to determine compatible options.\n"))
             return buildopt
 
         for opt in options:
--- a/util/ProcessLogger.py	Fri Jan 15 10:11:05 2021 +0100
+++ b/util/ProcessLogger.py	Fri Jan 15 10:15:41 2021 +0100
@@ -78,7 +78,6 @@
                  timeout=None, outlimit=None, errlimit=None,
                  endlog=None, keyword=None, kill_it=False, cwd=None,
                  encoding=None, output_encoding=None):
-        assert(logger)
         self.logger = logger
         if not isinstance(Command, list):
             self.Command_str = Command
@@ -160,7 +159,7 @@
             v = v.decode(self.output_encoding)
         self.outdata.append(v)
         self.outlen += 1
-        if not self.no_stdout:
+        if self.logger and not self.no_stdout:
             self.logger.write(v)
         if (self.keyword and v.find(self.keyword) != -1) or (self.outlimit and self.outlen > self.outlimit):
             self.endlog()
@@ -170,7 +169,7 @@
             v = v.decode(self.output_encoding)
         self.errdata.append(v)
         self.errlen += 1
-        if not self.no_stderr:
+        if self.logger and not self.no_stderr:
             self.logger.write_warning(v)
         if self.errlimit and self.errlen > self.errlimit:
             self.endlog()