Commit 1090b92f authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[2710] small cleanup: make _accounts_file member 'private'

parent 38faa03d
......@@ -502,7 +502,7 @@ class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
self._verbose = verbose
self._lock = threading.Lock()
self._user_infos = {}
self._accounts_file = None
self.__accounts_file = None
self.__accounts_file_mtime = 0
def _create_user_info(self, accounts_file):
......@@ -512,14 +512,14 @@ class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
# If the file does not exist, set accounts to empty, and return
if not os.path.exists(accounts_file):
self._user_infos = {}
self._accounts_file = accounts_file
self.__accounts_file = accounts_file
self.__accounts_file_mtime = 0
return
# If the filename hasn't changed, and the file itself
# has neither, do nothing
accounts_file_mtime = os.stat(accounts_file).st_mtime
if self._accounts_file == accounts_file and\
if self.__accounts_file == accounts_file and\
accounts_file_mtime <= self.__accounts_file_mtime:
return
......@@ -538,7 +538,7 @@ class SecureHTTPServer(socketserver_mixin.NoPollMixIn,
if csvfile:
csvfile.close()
self._accounts_file = accounts_file
self.__accounts_file = accounts_file
self.__accounts_file_mtime = accounts_file_mtime
if len(self._user_infos) == 0:
logger.error(CMDCTL_NO_USER_ENTRIES_READ)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment