From 381b96af815f619719d490824c23077fb893eff8 Mon Sep 17 00:00:00 2001 From: Eyantra698Sumanto Date: Fri, 26 Aug 2022 18:13:04 +0530 Subject: Fixed path_name undefined and out of bound index errors --- src/kicadtoNgspice/DeviceModel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/kicadtoNgspice/DeviceModel.py') diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index b120f2e7..c1eb5f90 100755 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -159,11 +159,13 @@ sky130_fd_pr/models/sky130.lib.spice") self.entry_var[self.count].setText("") self.entry_var[self.count].setMaximumWidth(150) self.entry_var[self.count].setObjectName("%d" % beg) + path_name = '' for child in self.root: if child.tag == "scmode1": if child[1].text: self.entry_var[self.count] \ .setText(child[1].text) + path_name = child[0].text else: self.entry_var[self.count].setText("") @@ -223,6 +225,7 @@ sky130_fd_pr/models/sky130.lib.spice") sky130box.setTitle( "Add parameters for " + words[0] + " : " + words[-1]) + path_name = '' # Adding to get sky130 dimension self.parameterLabel[self.count] = QtWidgets.QLabel( @@ -251,7 +254,7 @@ sky130_fd_pr/models/sky130.lib.spice") if child[0].text: self.entry_var[self.count] \ .setText(child[0].text) - path_name = "" + path_name = child[0].text else: self.entry_var[self.count].setText("") path_name = "" -- cgit