diff --git a/avaframeConnector_commonFunc.py b/avaframeConnector_commonFunc.py index 1ad9d48..e683aad 100644 --- a/avaframeConnector_commonFunc.py +++ b/avaframeConnector_commonFunc.py @@ -432,8 +432,7 @@ def runAndCheck(command, self, feedback): # Handle ERRORs elif "ERROR" in line: - cleanErrorMsg = "ERROR:" + line.split(":")[-1] - raise QgsProcessingException(self.tr(cleanErrorMsg)) + raise QgsProcessingException(self.tr(line)) else: print(line, flush=True) feedback.pushInfo(line) diff --git a/runIn1RelInfo_algorithm.py b/runIn1RelInfo_algorithm.py index 22d1987..4704aca 100644 --- a/runIn1RelInfo_algorithm.py +++ b/runIn1RelInfo_algorithm.py @@ -30,7 +30,8 @@ import pathlib -import subprocess +import os +import platform from qgis.PyQt.QtCore import QCoreApplication @@ -147,10 +148,19 @@ def processAlgorithm(self, parameters, context, feedback): feedback.pushInfo("Find the release area info file here:") feedback.pushInfo(str(resDir.resolve())) + feedback.pushInfo("---------------------------------\n") + # Trying to show the output folder in the file explorer + outputDir = os.path.dirname(resDir) + if platform.system() == 'Windows': + os.startfile(outputDir) + elif platform.system() == 'Darwin': # macOS + os.system(f'open "{outputDir}"') + else: # Linux + os.system(f'xdg-open "{outputDir}"') + return {} - # return {self.OUTPUT: rasterResults} def name(self): """