Do not miserably fail if /conf doesnt exists

This commit is contained in:
Alexandre Aubin 2020-03-31 21:22:35 +02:00
parent d53ee42a7f
commit a9559d7953

View file

@ -344,7 +344,7 @@ class App():
# - Spot path traversal issue vulnerability
#
for filename in os.listdir(self.path + "/conf"):
for filename in os.listdir(self.path + "/conf") if os.path.exists(self.path + "/conf") else []:
# Ignore subdirs or filename not containing nginx in the name
if not os.path.isfile(self.path + "/conf/" + filename) or "nginx" not in filename:
continue