honor enforce=False (fix #235)

This commit is contained in:
ziirish 2018-01-06 00:04:25 +01:00
parent c91f14476d
commit 016cd0d300
No known key found for this signature in database
GPG key ID: 72DB229A64B54E46

View file

@ -171,7 +171,7 @@ class Parser(Doc):
path = os.path.normpath(path)
cond = [path.startswith(x) for x in self.backend.includes]
if not any(cond):
if not any(cond) and self.backend.enforce:
self.logger.warning(
'Tried to access non-allowed path: {}'.format(path)
)