Commit 95fd702a authored by Jan Dinkelbach's avatar Jan Dinkelbach
Browse files

fix setting profile if serializationProfile unset

parent bbd5973f
......@@ -198,9 +198,9 @@ def _sort_classes_to_profile(class_attributes_list, activeProfileList):
if 'class' in possibleProfileList[klass['name']].keys():
for klass_profile in possibleProfileList[klass['name']]['class']:
if Profile[klass_profile].name in activeProfileList:
if Profile(klass_profile).name in activeProfileList:
# active profile for class export found
class_serializationProfile = Profile[klass_profile].name
class_serializationProfile = Profile(klass_profile).name
if class_serializationProfile == '':
# no profile in possibleProfileList active
......@@ -367,7 +367,7 @@ def generate_xml(cim_data, version, model_name, profile, available_profiles):
if not in export_dict.keys() and not in about_dict.keys():
raise RuntimeError("Profile not available for export")
raise RuntimeError("Profile " + + " not available for export, export_dict=" + str(export_dict.keys()) + ' and about_dict='+ str(about_dict.keys()) + '.')
# extract class lists from export_dict and about_dict
if in export_dict.keys():
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment