mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
86e963abc0
commit
687c088f45
|
|
@ -117,8 +117,12 @@ def _get_pet_name_handle(base_dir: str, nickname: str, domain: str,
|
||||||
|
|
||||||
if not os.path.isfile(petnames_filename):
|
if not os.path.isfile(petnames_filename):
|
||||||
return ''
|
return ''
|
||||||
|
petnames_str = ''
|
||||||
|
try:
|
||||||
with open(petnames_filename, 'r', encoding='utf-8') as petnames_file:
|
with open(petnames_filename, 'r', encoding='utf-8') as petnames_file:
|
||||||
petnames_str = petnames_file.read()
|
petnames_str = petnames_file.read()
|
||||||
|
except OSError:
|
||||||
|
print('EX: _get_pet_name_handle unable to read ' + petnames_filename)
|
||||||
if petname + ' ' in petnames_str:
|
if petname + ' ' in petnames_str:
|
||||||
petnames_list = petnames_str.split('\n')
|
petnames_list = petnames_str.split('\n')
|
||||||
for pet in petnames_list:
|
for pet in petnames_list:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue