epubs can be invalid
This commit is contained in:
parent
836ff68f4c
commit
4549a4be4e
1 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,10 @@ def cover(path):
|
||||||
|
|
||||||
def use(filename):
|
def use(filename):
|
||||||
logger.debug('using %s', filename)
|
logger.debug('using %s', filename)
|
||||||
data = z.read(filename)
|
try:
|
||||||
|
data = z.read(filename)
|
||||||
|
except:
|
||||||
|
return None
|
||||||
r = get_ratio(data)
|
r = get_ratio(data)
|
||||||
if r < 0.3 or r > 2:
|
if r < 0.3 or r > 2:
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in a new issue