Catch all OSErrors when reading title.txt
Previously we only caught FileNotFoundError. If there was a PermissionError for example, it would have percolated up and stopped some background tasks.
このコミットが含まれているのは:
コミット
36666f8cdf
|
@ -20,7 +20,8 @@ async def get_stream_title():
|
|||
try:
|
||||
async with aiofiles.open(CONFIG['STREAM_TITLE']) as fp:
|
||||
title = await fp.read(8192)
|
||||
except FileNotFoundError:
|
||||
except OSError as e:
|
||||
print(f'WARNING: could not read stream title: {e}')
|
||||
title = ''
|
||||
return title
|
||||
|
||||
|
|
読み込み中…
新しいイシューから参照