mirror of https://github.com/fail2ban/fail2ban
Merge branch '0.10' into 0.11
commit
4942578de0
|
@ -673,10 +673,10 @@ class LogFileMonitor(LogCaptureTestCase):
|
|||
failure_was_logged = self._is_logged('Unable to open %s' % self.name)
|
||||
# verify that we cannot access the file. Checking by name of user is not
|
||||
# sufficient since could be a fakeroot or some other super-user
|
||||
is_root = True
|
||||
try:
|
||||
with open(self.name) as f:
|
||||
with open(self.name) as f: # pragma: no cover - normally no root
|
||||
f.read()
|
||||
is_root = True
|
||||
except IOError:
|
||||
is_root = False
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ if not CONFIG_DIR:
|
|||
# Use heuristic to figure out where configuration files are
|
||||
if os.path.exists(os.path.join('config','fail2ban.conf')):
|
||||
CONFIG_DIR = 'config'
|
||||
else:
|
||||
else: # pragma: no cover - normally unreachable
|
||||
CONFIG_DIR = '/etc/fail2ban'
|
||||
|
||||
# Indicates that we've stock config:
|
||||
|
|
Loading…
Reference in New Issue