diff mbox

scanpypi: fix help text handling

Message ID 1466428373-17411-1-git-send-email-yegorslists@googlemail.com
State Accepted
Headers show

Commit Message

Yegor Yefremov June 20, 2016, 1:12 p.m. UTC
From: Yegor Yefremov <yegorslists@googlemail.com>

Make sure a help text is terminated with a full stop.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 support/scripts/scanpypi | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Petazzoni July 3, 2016, 10:35 p.m. UTC | #1
Hello,

On Mon, 20 Jun 2016 15:12:53 +0200, yegorslists@googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> Make sure a help text is terminated with a full stop.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  support/scripts/scanpypi | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to master, thanks.

Thomas
diff mbox

Patch

diff --git a/support/scripts/scanpypi b/support/scripts/scanpypi
index 230791f..da578f4 100755
--- a/support/scripts/scanpypi
+++ b/support/scripts/scanpypi
@@ -527,6 +527,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'])