aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-26 00:43:46 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-26 00:43:46 +0100
commitad8915b7297992947e1ddeab80c42e9f64571e9b (patch)
tree200b8963e56dd0da38d57d7ad311cd8e83c4ac31 /youtube_dl/YoutubeDL.py
parent34cbc7ee8db36e85d2021455f468c5dc2da616b8 (diff)
Add --no-warnings option (Fixes #2630)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index d18d6dd00..ae0ec49f8 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -94,6 +94,7 @@ class YoutubeDL(object):
usenetrc: Use netrc for authentication instead.
verbose: Print additional info to stdout.
quiet: Do not print messages to stdout.
+ no_warnings: Do not print out anything for warnings.
forceurl: Force printing final URL.
forcetitle: Force printing title.
forceid: Force printing ID.
@@ -376,6 +377,8 @@ class YoutubeDL(object):
if self.params.get('logger') is not None:
self.params['logger'].warning(message)
else:
+ if self.params.get('no_warnings'):
+ return
if self._err_file.isatty() and os.name != 'nt':
_msg_header = '\033[0;33mWARNING:\033[0m'
else: