Consistent filename

main
Bob Mottram 2024-01-17 11:37:19 +00:00
parent 0ca9e53d12
commit 3060f95637
1 changed files with 4 additions and 4 deletions

View File

@ -1137,14 +1137,14 @@ def _load_auto_cw(base_dir: str, nickname: str, domain: str) -> []:
"""Loads automatic CWs file and returns a list containing """Loads automatic CWs file and returns a list containing
the lines of the file the lines of the file
""" """
filename = acct_dir(base_dir, nickname, domain) + '/autocw.txt' auto_cw_filename = acct_dir(base_dir, nickname, domain) + '/autocw.txt'
if not os.path.isfile(filename): if not os.path.isfile(auto_cw_filename):
return [] return []
try: try:
with open(filename, 'r', encoding='utf-8') as fp_auto: with open(auto_cw_filename, 'r', encoding='utf-8') as fp_auto:
return fp_auto.readlines() return fp_auto.readlines()
except OSError: except OSError:
print('EX: unable to load auto cw file ' + filename) print('EX: unable to load auto cw file ' + auto_cw_filename)
return [] return []