summaryrefslogtreecommitdiffstats
path: root/rtemsspec/content.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-24 16:05:49 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-09-18 13:27:33 +0200
commitf59bfb6b8cebf98c7b25e95b7b498949f5462222 (patch)
tree8b7f77572a62838cb7e3f733c2c2cb1c9865f1dc /rtemsspec/content.py
parentspec: Move specification of specification items (diff)
downloadrtems-central-f59bfb6b8cebf98c7b25e95b7b498949f5462222.tar.bz2
content: Add Content.ensure_blank_line()
Diffstat (limited to 'rtemsspec/content.py')
-rw-r--r--rtemsspec/content.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rtemsspec/content.py b/rtemsspec/content.py
index 5e8da8b6..cfef89c6 100644
--- a/rtemsspec/content.py
+++ b/rtemsspec/content.py
@@ -386,6 +386,11 @@ class Content:
""" Adds a blank line. """
self._lines.append("")
+ def ensure_blank_line(self):
+ """ Ensures that the last line is blank. """
+ if not self._lines or self._lines[-1]:
+ self._lines.append("")
+
def register_license(self, the_license: str) -> None:
""" Registers a licence for the content. """
licenses = re.split(r"\s+OR\s+", the_license)