|
@@ -374,13 +374,14 @@ def load_dhdl_options_xml(model, elem):
|
374
|
374
|
for opt in elem:
|
375
|
375
|
if (opt.tag == 'allowed_classes'):
|
376
|
376
|
classes = list()
|
377
|
|
- clss = opt.text.split(',')
|
378
|
|
- for classe in clss:
|
379
|
|
- if classe in model.all_classes():
|
380
|
|
- classes.append(model.all_classes_ref(classe))
|
381
|
|
- else:
|
382
|
|
- new_cls = model.add_class(EmClass(classe))
|
383
|
|
- classes.append(new_cls)
|
|
377
|
+ if opt.text is not None:
|
|
378
|
+ clss = opt.text.split(',')
|
|
379
|
+ for classe in clss:
|
|
380
|
+ if classe in model.all_classes():
|
|
381
|
+ classes.append(model.all_classes_ref(classe))
|
|
382
|
+ else:
|
|
383
|
+ new_cls = model.add_class(EmClass(classe))
|
|
384
|
+ classes.append(new_cls)
|
384
|
385
|
dhdl_options['allowed_classes'] = classes
|
385
|
386
|
elif (opt.tag == 'back_reference'):
|
386
|
387
|
dhdl_options['back_reference'] = tuple(opt.text.split(','))
|