mirror of https://gitlab.com/bashrc2/epicyon
Consistent filename
parent
0ca9e53d12
commit
3060f95637
8
posts.py
8
posts.py
|
@ -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 []
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue