diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-18 09:17:45 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-18 09:19:39 +0530 |
commit | 44a6fcff397e98b4aa7e3bb1da7425b3cca05a71 (patch) | |
tree | b619511891f7b7ef5c3c7b85c25bc4b32ddff4c5 /yt_dlp/utils.py | |
parent | bf1824b391e2f18b7e927f54340c0aabfa9399cd (diff) |
Improve error handling of bad config files
Related: #824
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index ea5bb3459..72223d771 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -5420,6 +5420,8 @@ class Config: # FIXME: https://github.com/ytdl-org/youtube-dl/commit/dfe5fa49aed02cf36ba9f743b11b0903554b5e56 contents = optionf.read() res = shlex.split(contents, comments=True) + except Exception as err: + raise ValueError(f'Unable to parse "{filename}": {err}') finally: optionf.close() return res |