summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-08-22 00:48:55 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:28:41 +0100
commit8e686771af73876f93e44c52dc0dcaf99a56b6f7 (patch)
tree63f007e9efc8a3696a155c9e2b2b4ec0955d0be5
parent2933532c5bd4c49d325f3fa485e0b3c9ea080952 (diff)
downloadyoutube-dl-8e686771af73876f93e44c52dc0dcaf99a56b6f7.tar.gz
youtube-dl-8e686771af73876f93e44c52dc0dcaf99a56b6f7.tar.xz
youtube-dl-8e686771af73876f93e44c52dc0dcaf99a56b6f7.zip
Decode the reason given on YouTube errors to avoid crashes (fixes issue #193)
-rwxr-xr-xyoutube-dl2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl
index d7b30adca..c850f26b3 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -849,7 +849,7 @@ class YoutubeIE(InfoExtractor):
 				return
 		if 'token' not in video_info:
 			if 'reason' in video_info:
-				self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0])
+				self._downloader.trouble(u'ERROR: YouTube said: %s' % video_info['reason'][0].decode('utf-8'))
 			else:
 				self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason')
 			return