Skip to content

Commit

Permalink
Merge pull request #50 from grycap/devel
Browse files Browse the repository at this point in the history
Fix #49
  • Loading branch information
micafer authored Dec 9, 2022
2 parents fc8d618 + 19f3ffb commit f7523c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion radl/radl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,12 @@ def __init__(self):
"""List of contextualize."""

def __str__(self):
return "\n".join([str(f) for fs in [self.ansible_hosts, self.networks, self.systems, self.configures,
res = ""
if self.description:
res = str(self.description) + "\n"
res += "\n".join([str(f) for fs in [self.ansible_hosts, self.networks, self.systems, self.configures,
[self.contextualize], self.deploys] for f in fs])
return res

def add(self, aspect, ifpresent="error"):
"""
Expand Down Expand Up @@ -1514,3 +1518,6 @@ def __init__(self, name, features=None, reference=False, line=None):
"""True if it is only a reference and it isn't a definition."""
Features.__init__(self, features)
self.line = line

def __str__(self):
return "description %s (%s)" % (self.id, Features.__str__(self))
1 change: 0 additions & 1 deletion test/TestRADL.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ def test_description(self):
self.assertEqual(r.description.getValue("long"), "long desc")

radl_json = dump_radl_json(r)
print(radl_json)
r = parse_radl_json(radl_json)
r.check()
self.assertEqual(r.description.getValue("long"), "long desc")
Expand Down

0 comments on commit f7523c3

Please sign in to comment.