refactoring

This commit is contained in:
Maxim Devaev
2023-03-07 23:54:05 +02:00
parent 002031baf1
commit f652eca9c2
15 changed files with 49 additions and 49 deletions

View File

@@ -40,8 +40,8 @@ class IpmiUserCredentials:
class IpmiAuthManager:
def __init__(self, path: str) -> None:
self.__path = path
with open(path) as passwd_file:
self.__credentials = self.__parse_passwd_file(passwd_file.read().split("\n"))
with open(path) as file:
self.__credentials = self.__parse_passwd_file(file.read().split("\n"))
def __contains__(self, ipmi_user: str) -> bool:
return (ipmi_user in self.__credentials)