From ce7a57d57ae438536f595e8048d65f3e0cc229f5 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 29 Jan 2013 21:59:28 -0800 Subject: [PATCH] warning about _unpack_asf_image --- beets/mediafile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/beets/mediafile.py b/beets/mediafile.py index 29b2c3ae7..491f61a3b 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -148,9 +148,15 @@ def _safe_cast(out_type, val): # Image coding for ASF/WMA. def _unpack_asf_image(data): - """Unpack image data from a WM/Picture tag. + """Unpack image data from a WM/Picture tag. Return a tuple + containing the MIME type, the raw image data, a type indicator, and + the image's description. + + This function is treated as "untrusted" and could throw all manner + of exceptions (out-of-bounds, etc.). We should clean this up + sometime so that the failure modes are well-defined. """ - (type, size) = struct.unpack_from("