aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/__init__.py')
-rw-r--r--yt_dlp/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py
index 3020b6e95..d72e08b35 100644
--- a/yt_dlp/__init__.py
+++ b/yt_dlp/__init__.py
@@ -795,15 +795,15 @@ def main(argv=None):
_real_main(argv)
except DownloadError:
sys.exit(1)
- except SameFileError:
- sys.exit('ERROR: fixed output name but more than one file to download')
+ except SameFileError as e:
+ sys.exit(f'ERROR: {e}')
except KeyboardInterrupt:
sys.exit('\nERROR: Interrupted by user')
- except BrokenPipeError:
+ except BrokenPipeError as e:
# https://docs.python.org/3/library/signal.html#note-on-sigpipe
devnull = os.open(os.devnull, os.O_WRONLY)
os.dup2(devnull, sys.stdout.fileno())
- sys.exit(r'\nERROR: {err}')
+ sys.exit(f'\nERROR: {e}')
__all__ = ['main', 'YoutubeDL', 'gen_extractors', 'list_extractors']