소스 검색

scanpypi: fix help text handling

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>
Yegor Yefremov 9 년 전
부모
커밋
f49295cc42
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      support/scripts/scanpypi

+ 5 - 0
support/scripts/scanpypi

@@ -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'])