]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[postprocessor/common] Use generalized cli option converters
authorSergey M․ <dstftw@gmail.com>
Fri, 4 Sep 2015 21:06:53 +0000 (03:06 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 4 Sep 2015 21:06:53 +0000 (03:06 +0600)
youtube_dl/postprocessor/common.py

index 4191d040bb1da468e248d57b78df1afdacf64cd0..150ef917347e43c972d541bcb3f394b8db6d8ac4 100644 (file)
@@ -4,6 +4,7 @@ import os
 
 from ..utils import (
     PostProcessingError,
+    cli_configuration_args,
     encodeFilename,
 )
 
@@ -61,11 +62,7 @@ class PostProcessor(object):
             self._downloader.report_warning(errnote)
 
     def _configuration_args(self, default=[]):
-        pp_args = self._downloader.params.get('postprocessor_args')
-        if pp_args is None:
-            return default
-        assert isinstance(pp_args, list)
-        return pp_args
+        return cli_configuration_args(self.params, 'postprocessor_args', default)
 
 
 class AudioConversionError(PostProcessingError):