summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kicadtoNgspice/Convert.py4
-rw-r--r--src/kicadtoNgspice/Model.py2
-rw-r--r--src/ngspicetoModelica/ModelicaUI.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 725a6909..76b6ba57 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -443,8 +443,8 @@ class Convert:
default = 0
# Cheking if value is iterable.its for vector
if (
- hasattr(value, '__iter__') and
- type(value) is not str
+ type(value) is not str and
+ hasattr(value, '__iter__')
):
addmodelLine += param + "=["
for lineVar in value:
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py
index dc94d9de..eb1793f9 100644
--- a/src/kicadtoNgspice/Model.py
+++ b/src/kicadtoNgspice/Model.py
@@ -62,7 +62,7 @@ class Model(QtGui.QWidget):
# print "Key : ",key
# print "Value : ",value
# Check if value is iterable
- if hasattr(value, '__iter__') and type(value) is not str:
+ if type(value) is not str and hasattr(value, '__iter__'):
# For tag having vector value
temp_tag = []
for item in value:
diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py
index e523da8b..5d9a6ab9 100644
--- a/src/ngspicetoModelica/ModelicaUI.py
+++ b/src/ngspicetoModelica/ModelicaUI.py
@@ -52,7 +52,7 @@ class OpenModelicaEditor(QtGui.QWidget):
def callConverter(self):
try:
- self.cmd1 = "python3 ../ngspicetoModelica/NgspicetoModelica.py" + \
+ self.cmd1 = "python3 ../ngspicetoModelica/NgspicetoModelica.py " + \
self.ngspiceNetlist + ' ' + self.map_json
# self.obj_workThread1 = Worker.WorkerThread(self.cmd1)
# self.obj_workThread1.start()