From 92939becd03c02e71820a95ed4cd87fd47a991fe Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 1 May 2017 12:49:15 +0200 Subject: [PATCH] python: minor improvement and fix Signed-off-by: Thorsten Liebig --- python/openEMS/openEMS.pyx | 2 +- python/openEMS/ports.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/openEMS/openEMS.pyx b/python/openEMS/openEMS.pyx index 5161e3d..a449a34 100644 --- a/python/openEMS/openEMS.pyx +++ b/python/openEMS/openEMS.pyx @@ -396,7 +396,7 @@ cdef class openEMS: if properties is not None and type(properties) is not list: prim_list += properties.GetAllPrimitives() - elif primitives is not None: + elif properties is not None: for prop in properties: prim_list += prop.GetAllPrimitives() diff --git a/python/openEMS/ports.py b/python/openEMS/ports.py index 1f0ea2a..1af1564 100644 --- a/python/openEMS/ports.py +++ b/python/openEMS/ports.py @@ -66,8 +66,8 @@ class Port: self.start = np.array(start, np.float) self.stop = np.array(stop, np.float) self.Z_ref = None - self.U_filenames = [] - self.I_filenames = [] + self.U_filenames = kw.get('U_filenames', []) + self.I_filenames = kw.get('I_filenames', []) self.priority = 0 if 'priority' in kw: