From 992f491e5e8599dec7a95f80ded3b11463197480 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 24 Oct 2021 14:32:15 +0200 Subject: [PATCH] Don't grep doc/ if folder doesn't exist, should prevent some issues --- package_linter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package_linter.py b/package_linter.py index 30be907..7366ac3 100755 --- a/package_linter.py +++ b/package_linter.py @@ -455,8 +455,9 @@ class App(TestSuite): @test() def disclaimer_wording(app): - if os.system(r"grep -nr -q 'Any known limitations, constrains or stuff not working, such as\|Other infos that people should be' %s/doc/" % app.path) == 0: - yield Info("In DISCLAIMER.md: 'Any known limitations [...] such as' and 'Other infos [...] such as' are supposed to be placeholder sentences meant to explain to packagers what is the expected content, but is not an appropriate wording for end users :/") + if os.path.exists(app.path + "/doc"): + if os.system(r"grep -nr -q 'Any known limitations, constrains or stuff not working, such as\|Other infos that people should be' %s/doc/" % app.path) == 0: + yield Info("In DISCLAIMER.md: 'Any known limitations [...] such as' and 'Other infos [...] such as' are supposed to be placeholder sentences meant to explain to packagers what is the expected content, but is not an appropriate wording for end users :/") @test() def change_url_script(app):