Remove redundant open modes (#33652)

This commit is contained in:
Franck Nijhof 2020-04-04 22:49:15 +02:00 committed by GitHub
parent fddaea797e
commit 22ae498f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 12 deletions

View file

@ -114,7 +114,7 @@ class BanLogParser:
"""Read the fail2ban log and find entries for jail."""
self.data = list()
try:
with open(self.log_file, "r", encoding="utf-8") as file_data:
with open(self.log_file, encoding="utf-8") as file_data:
self.data = self.ip_regex[jail].findall(file_data.read())
except (IndexError, FileNotFoundError, IsADirectoryError, UnboundLocalError):