aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-01 19:58:13 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-10-01 19:58:13 +0800
commitd54739a2e6a8dc089e7530afda0a1cfe355a6fef (patch)
tree6ff542d0a0c70dd9d11da8c1f39016d09a7339ad
parent63e0fd5bccf5cfb85e00e5935f4b6961ff26c58c (diff)
downloadyoutube-dl-d54739a2e6a8dc089e7530afda0a1cfe355a6fef.zip
youtube-dl-d54739a2e6a8dc089e7530afda0a1cfe355a6fef.tar.gz
youtube-dl-d54739a2e6a8dc089e7530afda0a1cfe355a6fef.tar.bz2
[downloader/http] xattr values should be bytes
-rw-r--r--youtube_dl/downloader/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 11294d1..af405b9 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -182,7 +182,7 @@ class HttpFD(FileDownloader):
if self.params.get('xattr_set_filesize', False) and data_len is not None:
try:
- write_xattr(tmpfilename, 'user.ytdl.filesize', str(data_len))
+ write_xattr(tmpfilename, 'user.ytdl.filesize', str(data_len).encode('utf-8'))
except (XAttrUnavailableError, XAttrMetadataError) as err:
self.report_error('unable to set filesize xattr: %s' % str(err))