mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1214 (Feeds2lrf crash when downloading http://rss.gazeta.pl/pub/rss/gazetawyborcza.xml)
This commit is contained in:
parent
2b1cebd3aa
commit
c44f842c2c
@ -177,7 +177,10 @@ class Expression(Code):
|
|||||||
"""
|
"""
|
||||||
__traceback_hide__ = 'before_and_this'
|
__traceback_hide__ = 'before_and_this'
|
||||||
_globals = self._globals(data)
|
_globals = self._globals(data)
|
||||||
return eval(self.code, _globals, {'__data__': data})
|
code = self.code
|
||||||
|
if not isinstance(code, unicode):
|
||||||
|
code = code.decode('utf-8', 'replace')
|
||||||
|
return eval(code, _globals, {'__data__': data})
|
||||||
|
|
||||||
|
|
||||||
class Suite(Code):
|
class Suite(Code):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user