summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav P2023-06-01 12:10:54 +0530
committerPranav P2023-06-01 12:10:54 +0530
commitfd3852efb732b6434a5327a056135f3444b93ba3 (patch)
tree453e1d9915aeb47d0e1c47b870909875da22f1c8
parentb0dc41fb3e6ae9fb0f29b4e44524250807d41e49 (diff)
downloadeSim-fd3852efb732b6434a5327a056135f3444b93ba3.tar.gz
eSim-fd3852efb732b6434a5327a056135f3444b93ba3.tar.bz2
eSim-fd3852efb732b6434a5327a056135f3444b93ba3.zip
Suppressed PrinterOnly error of ngspice batch mode
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 138642ca..b19936de 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -97,7 +97,12 @@ class NgspiceWidget(QtWidgets.QWidget):
self.terminalUi.simulationConsole.insertPlainText(
str(self.process.readAllStandardOutput().data(), encoding='utf-8')
)
- stderror = self.process.readAllStandardError()
+
+ stderror = str(self.process.readAllStandardError().data(), encoding='utf-8')
+ #For suppressing the PrinterOnly error that batch mode throws
+ stderror = '\n'.join([line for line in stderror.split('\n')
+ if ('PrinterOnly' not in line and
+ 'viewport for graphics' not in line)])
self.terminalUi.simulationConsole.insertPlainText(
- str(stderror.data(), encoding='utf-8')
+ stderror
) \ No newline at end of file