scanpypi: fix help text handling
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 20 Jun 2016 13:12:53 +0000 (15:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 3 Jul 2016 22:35:16 +0000 (00:35 +0200)
Make sure a help text is terminated with a full stop.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/scanpypi

index 79a888c5b227edc84c72aa00bd03a660b72cd017..f0d584a158acd604e4a2b9180fe5b403facb0832 100755 (executable)
@@ -525,6 +525,11 @@ class BuildrootPackage():
         help_lines = textwrap.wrap(self.metadata['info']['summary'],
                                    initial_indent='\t  ',
                                    subsequent_indent='\t  ')
+
+        # make sure a help text is terminated with a full stop
+        if help_lines[-1][-1] != '.':
+            help_lines[-1] += '.'
+
         # \t + two spaces is 3 char long
         help_lines.append('')
         help_lines.append('\t  ' + self.metadata['info']['home_page'])