summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/DeviceModel.py
diff options
context:
space:
mode:
authorRahul P2020-04-09 18:36:19 +0530
committerGitHub2020-04-09 18:36:19 +0530
commit6a0ef73be748b4e885d4288dede37fc76ad95158 (patch)
treeabf923d3c1559d26fc2324e53b2711907f433db9 /src/kicadtoNgspice/DeviceModel.py
parent71d2ee1a0984569bd4069c953422144c3ce8f29b (diff)
parent26db6439a3038b92d23ade0a2bcf37ba57c87f7b (diff)
downloadeSim-6a0ef73be748b4e885d4288dede37fc76ad95158.tar.gz
eSim-6a0ef73be748b4e885d4288dede37fc76ad95158.tar.bz2
eSim-6a0ef73be748b4e885d4288dede37fc76ad95158.zip
Merge pull request #149 from rahulp13/master
resolved issues with rename and refresh projects, empty path
Diffstat (limited to 'src/kicadtoNgspice/DeviceModel.py')
-rw-r--r--src/kicadtoNgspice/DeviceModel.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index c4ea9a22..31ff74f7 100644
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -90,16 +90,16 @@ class DeviceModel(QtGui.QWidget):
# print("DEVICE MODEL MATCHING---", \
# child.tag, words[0])
try:
- if os.path.exists(child[0].text):
+ if child[0].text \
+ and os.path.exists(child[0].text):
self.entry_var[self.count] \
.setText(child[0].text)
path_name = child[0].text
else:
self.entry_var[self.count].setText("")
- except BaseException:
- print(
- "Error when set text of device\
- model transistor")
+ except BaseException as e:
+ print("Error when set text of device " +
+ "model transistor :", str(e))
except BaseException:
pass
@@ -153,15 +153,16 @@ class DeviceModel(QtGui.QWidget):
# print("DEVICE MODEL MATCHING---", \
# child.tag, words[0])
try:
- if os.path.exists(child[0].text):
+ if child[0].text \
+ and os.path.exists(child[0].text):
path_name = child[0].text
self.entry_var[self.count] \
.setText(child[0].text)
else:
self.entry_var[self.count].setText("")
- except BaseException:
- print("Error when set text of device\
- model diode")
+ except BaseException as e:
+ print("Error when set text of device " +
+ "model diode :", str(e))
except BaseException:
pass
@@ -215,15 +216,16 @@ class DeviceModel(QtGui.QWidget):
# print("DEVICE MODEL MATCHING---", \
# child.tag, words[0])
try:
- if os.path.exists(child[0].text):
+ if child[0].text \
+ and os.path.exists(child[0].text):
self.entry_var[self.count] \
.setText(child[0].text)
path_name = child[0].text
else:
self.entry_var[self.count].setText("")
- except BaseException:
- print("Error when set text of Device\
- Model JFET ")
+ except BaseException as e:
+ print("Error when set text of Device " +
+ "Model JFET :", str(e))
except BaseException:
pass