Commit e0944692 authored by Martin Alonso Moraga's avatar Martin Alonso Moraga
Browse files

fixed some errors

parent e88638e3
Pipeline #220290 passed with stages
in 21 seconds
......@@ -294,16 +294,6 @@ def _set_attributes(res, xml_files, namespace_rdf, base, logger_errors_grouped):
val = uuid2.rsplit(".", 1)[1]
setattr(obj, attr, val)
if package is not '':
obj.serializationProfile[attr] = short_package_name[package]
else:
error_msg = 'Package information not found for class {}, attribute {}'.format(
obj.__class__.__name__, attr
)
try:
logger_errors_grouped[error_msg] += 1
except KeyError:
logger_errors_grouped[error_msg] = 1
else: # if elem.get("{%s}ID" % nd_rdf is not None:
# Finished setting object attributes.
break
......
......@@ -129,8 +129,9 @@ def add_external_network_injection(res, version, mRID, voltage_set_point):
reg_name = 'Regulating Control ' + str(i)
terminal_name = 'Terminal Injection ' + str(i)
module_name = "cimpy." + version + ".Equipment."
#module_name = "cimpy." + version + ".Equipment."
module_name = "cimpy." + version + "."
terminal_module = importlib.import_module((module_name + 'Terminal'))
terminal_class = getattr(terminal_module, 'Terminal')
res[terminal_name] = terminal_class(mRID=terminal_name,
......@@ -141,7 +142,6 @@ def add_external_network_injection(res, version, mRID, voltage_set_point):
regulating_control_class = getattr(regulating_control_module, 'RegulatingControl')
res[reg_name] = regulating_control_class(mRID=reg_name,
name=reg_name,
RegulatingCondEq=res[inj_name],
targetValue=voltage_set_point,
Terminal=res[terminal_name])
......
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