python: minor improvement and fix

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
Thorsten Liebig 2017-05-01 12:49:15 +02:00
parent 9d05c86900
commit 92939becd0
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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: