aboutsummaryrefslogtreecommitdiff
path: root/youtube_dlc/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dlc/__init__.py')
-rw-r--r--youtube_dlc/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dlc/__init__.py b/youtube_dlc/__init__.py
index c681c8edb..4e55cf337 100644
--- a/youtube_dlc/__init__.py
+++ b/youtube_dlc/__init__.py
@@ -379,12 +379,15 @@ def _real_main(argv=None):
'when': 'aftermove'
})
- _args_compat_warning = 'WARNING: %s given without specifying name. The arguments will be given to all %s\n'
+ def report_args_compat(arg, name):
+ write_string(
+ 'WARNING: %s given without specifying name. The arguments will be given to all %s\n' % (arg, name),
+ out=sys.stderr)
if 'default' in opts.external_downloader_args:
- write_string(_args_compat_warning % ('--external-downloader-args', 'external downloaders'), out=sys.stderr),
+ report_args_compat('--external-downloader-args', 'external downloaders')
if 'default-compat' in opts.postprocessor_args and 'default' not in opts.postprocessor_args:
- write_string(_args_compat_warning % ('--post-processor-args', 'post-processors'), out=sys.stderr),
+ report_args_compat('--post-processor-args', 'post-processors')
opts.postprocessor_args.setdefault('sponskrub', [])
opts.postprocessor_args['default'] = opts.postprocessor_args['default-compat']