[SEBA-217] Certain fields should be marked as readonly
Change-Id: Ic8de963a878a8c85f1fb0706e08a93d39c7dc913
diff --git a/lib/xos-genx/xosgenx/generator.py b/lib/xos-genx/xosgenx/generator.py
index 307e914..d354f9a 100644
--- a/lib/xos-genx/xosgenx/generator.py
+++ b/lib/xos-genx/xosgenx/generator.py
@@ -178,11 +178,11 @@
lines = rendered.splitlines()
current_buffer = []
- for l in lines:
- if l.startswith("+++"):
+ for line in lines:
+ if line.startswith("+++"):
if dir:
- path = dir + "/" + l[4:].lower()
+ path = dir + "/" + line[4:].lower()
fil = open(path, "w")
buf = "\n".join(current_buffer)
@@ -197,7 +197,7 @@
current_buffer = []
else:
- current_buffer.append(l)
+ current_buffer.append(line)
@staticmethod
def _find_message_by_model_name(messages, model):
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/gui.py b/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
index 476548b..4abc651 100644
--- a/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
+++ b/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
@@ -134,22 +134,22 @@
def xproto_links_to_modeldef_relations(llst):
outlist = []
seen = []
- for l in llst:
+ for ll in llst:
try:
- t = l["link_type"]
+ t = ll["link_type"]
except KeyError as e:
raise e
- if l["peer"]["fqn"] not in seen and t != "manytomany":
+ if ll["peer"]["fqn"] not in seen and t != "manytomany":
on_field = "null"
- if l["link_type"] == "manytoone":
- on_field = l["src_port"]
- elif l["link_type"] == "onetomany":
- on_field = l["dst_port"]
+ if ll["link_type"] == "manytoone":
+ on_field = ll["src_port"]
+ elif ll["link_type"] == "onetomany":
+ on_field = ll["dst_port"]
outlist.append(
"{model: %s, type: %s, on_field: %s}"
- % (l["peer"]["name"], l["link_type"], on_field)
+ % (ll["peer"]["name"], ll["link_type"], on_field)
)
- seen.append(l["peer"])
+ seen.append(ll["peer"])
return outlist