From: Yen Chi Hsuan Date: Sat, 1 Oct 2016 11:58:13 +0000 (+0800) Subject: [downloader/http] xattr values should be bytes X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=d54739a2e6a8dc089e7530afda0a1cfe355a6fef;p=youtube-dl.git [downloader/http] xattr values should be bytes --- diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py index 11294d106..af405b950 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))