projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6bf9c28
)
[postprocessor/xattr] Clarify NO_SPACE message (#14970)
author
Sergey M․
<dstftw@gmail.com>
Wed, 13 Dec 2017 18:00:14 +0000
(
01:00
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 13 Dec 2017 18:05:02 +0000
(
01:05
+0700)
youtube_dl/postprocessor/xattrpp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/postprocessor/xattrpp.py
b/youtube_dl/postprocessor/xattrpp.py
index fbdfa02acc88ff8ba82684a2e5545aebe3fce5da..b0aed9ca7b2da21d09223b8822a0c530c2a7b4cc 100644
(file)
--- a/
youtube_dl/postprocessor/xattrpp.py
+++ b/
youtube_dl/postprocessor/xattrpp.py
@@
-42,6
+42,7
@@
class XAttrMetadataPP(PostProcessor):
'user.dublincore.format': 'format',
}
'user.dublincore.format': 'format',
}
+ num_written = 0
for xattrname, infoname in xattr_mapping.items():
value = info.get(infoname)
for xattrname, infoname in xattr_mapping.items():
value = info.get(infoname)
@@
-52,6
+53,7
@@
class XAttrMetadataPP(PostProcessor):
byte_value = value.encode('utf-8')
write_xattr(filename, xattrname, byte_value)
byte_value = value.encode('utf-8')
write_xattr(filename, xattrname, byte_value)
+ num_written += 1
return [], info
return [], info
@@
-62,8
+64,8
@@
class XAttrMetadataPP(PostProcessor):
except XAttrMetadataError as e:
if e.reason == 'NO_SPACE':
self._downloader.report_warning(
except XAttrMetadataError as e:
if e.reason == 'NO_SPACE':
self._downloader.report_warning(
- 'There\'s no disk space left
or disk quota
exceeded. ' +
-
'Extended attributes are not written.'
)
+ 'There\'s no disk space left
, disk quota exceeded or filesystem xattr limit
exceeded. ' +
+
(('Some ' if num_written else '') + 'extended attributes are not written.').capitalize()
)
elif e.reason == 'VALUE_TOO_LONG':
self._downloader.report_warning(
'Unable to write extended attributes due to too long values.')
elif e.reason == 'VALUE_TOO_LONG':
self._downloader.report_warning(
'Unable to write extended attributes due to too long values.')