diff options
author | rahulp13 | 2020-02-14 15:16:35 +0530 |
---|---|---|
committer | rahulp13 | 2020-02-14 15:16:35 +0530 |
commit | cb55e59de7ee4383c04edfae7c39ad9ae9552b36 (patch) | |
tree | de1b292a10e8196689bf1a208fe6fe32f4618846 /src/ngspicetoModelica | |
parent | 08d4a0336550a0e610709970a0c5d366e109fe82 (diff) | |
download | eSim-cb55e59de7ee4383c04edfae7c39ad9ae9552b36.tar.gz eSim-cb55e59de7ee4383c04edfae7c39ad9ae9552b36.tar.bz2 eSim-cb55e59de7ee4383c04edfae7c39ad9ae9552b36.zip |
common code for Win and Linux, merged py2 changes
Diffstat (limited to 'src/ngspicetoModelica')
-rw-r--r-- | src/ngspicetoModelica/ModelicaUI.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py index eca03534..d5daf9ad 100644 --- a/src/ngspicetoModelica/ModelicaUI.py +++ b/src/ngspicetoModelica/ModelicaUI.py @@ -44,13 +44,11 @@ class OpenModelicaEditor(QtGui.QWidget): self.show() def browseFile(self): - self.ngspiceNetlist = QtGui.QFileDialog.getOpenFileName( self, 'Open Ngspice file', BROWSE_LOCATION) self.FileEdit.setText(self.ngspiceNetlist) def callConverter(self): - try: self.cmd1 = ( "python3 ../ngspicetoModelica/NgspicetoModelica.py " + @@ -67,17 +65,18 @@ class OpenModelicaEditor(QtGui.QWidget): stderr=STDOUT, close_fds=True) error_code = convert_process.stdout.read() + if not error_code: self.msg = QtGui.QMessageBox() self.msg.setText( "Ngspice netlist successfully converted to OpenModelica" + - "netlist") + "netlist" + ) self.obj_appconfig.print_info( "Ngspice netlist successfully converted to OpenModelica" + "netlist" ) self.msg.exec_() - else: self.err_msg = QtGui.QErrorMessage() self.err_msg.showMessage( |