From f99f2ff5a1efe2c5a7158316afef9de5202366de Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Mar 2019 19:40:46 +0100 Subject: [PATCH] Additional check to avoid trying to read binary file in some edge case --- package_linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index ec190ca..bb6e732 100755 --- a/package_linter.py +++ b/package_linter.py @@ -144,7 +144,7 @@ class App(): # for filename in os.listdir(self.path + "/conf"): - if not os.path.isfile(self.path + "/conf/" + filename): + if not os.path.isfile(self.path + "/conf/" + filename) or "nginx" not in filename: continue content = open(self.path + "/conf/" + filename).read() if "location" in content and "add_header" in content: