mirror of https://gitlab.com/bashrc2/epicyon
Add exception handling
parent
0d291b9292
commit
a28030d6e1
5
utils.py
5
utils.py
|
@ -872,8 +872,13 @@ def is_artist(base_dir: str, nickname: str) -> bool:
|
|||
return True
|
||||
return False
|
||||
|
||||
lines = []
|
||||
try:
|
||||
with open(artists_file, 'r', encoding='utf-8') as fp_artists:
|
||||
lines = fp_artists.readlines()
|
||||
except OSError:
|
||||
print('EX: is_artist unable to read ' + artists_file)
|
||||
|
||||
if len(lines) == 0:
|
||||
admin_name = get_config_param(base_dir, 'admin')
|
||||
if admin_name:
|
||||
|
|
Loading…
Reference in New Issue