Merge pull request #866 from croneter/fix-unicode
Fix rare UnicodeDecodeError on library sync
This commit is contained in:
commit
04a6db6a21
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