wafcache: fix reporting of concurrent trim error

As this is run in the non-waf process we don't have Logs, so we
write to stderr instead or we will get a NameError name 'Logs' is
not defined.
This commit is contained in:
Federico Pellegrin 2021-01-11 11:18:48 +01:00
parent da22d7253c
commit 1619c2f0fa
1 changed files with 2 additions and 2 deletions

View File

@ -400,8 +400,8 @@ def lru_evict():
try:
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
except EnvironmentError:
if Logs.verbose:
Logs.debug('wafcache: another cleaning process is running')
if WAFCACHE_VERBOSITY:
sys.stderr.write('wafcache: another cleaning process is running\n')
else:
# now dow the actual cleanup
lru_trim()