Fix rare UnicodeDecodeError on library sync
This commit is contained in:
parent
15f34e2859
commit
03a9f84b9e
1 changed files with 3 additions and 3 deletions
|
@ -138,12 +138,12 @@ class File(object):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
if force_first_media is False:
|
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:
|
else:
|
||||||
ans = cast(str, self.xml[0][self.part].attrib['file'])
|
ans = self.xml[0][self.part].attrib['file']
|
||||||
except (TypeError, AttributeError, IndexError, KeyError):
|
except (TypeError, AttributeError, IndexError, KeyError):
|
||||||
return
|
return
|
||||||
return utils.unquote(ans)
|
return ans
|
||||||
|
|
||||||
def get_picture_path(self):
|
def get_picture_path(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue