Fix rare UnicodeDecodeError on library sync

This commit is contained in:
croneter 2019-06-12 13:02:29 +02:00
parent 15f34e2859
commit 03a9f84b9e

View file

@ -138,12 +138,12 @@ class File(object):
return
try:
if force_first_media is False:
ans = cast(str, self.xml[self.mediastream][self.part].attrib['file'])
ans = self.xml[self.mediastream][self.part].attrib['file']
else:
ans = cast(str, self.xml[0][self.part].attrib['file'])
ans = self.xml[0][self.part].attrib['file']
except (TypeError, AttributeError, IndexError, KeyError):
return
return utils.unquote(ans)
return ans
def get_picture_path(self):
"""