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: