s/exc_info=1/exc_info=True/g
This commit is contained in:
parent
6b70fa36c7
commit
d70bd8797a
14 changed files with 28 additions and 28 deletions
|
|
@ -44,7 +44,7 @@ def metadata(f, from_=None):
|
|||
elif ext == 'txt':
|
||||
info = txt.info(f)
|
||||
except:
|
||||
logger.debug('failed to load %s info from %s', ext, f, exc_info=1)
|
||||
logger.debug('failed to load %s info from %s', ext, f, exc_info=True)
|
||||
info = {}
|
||||
|
||||
opf_info = {}
|
||||
|
|
@ -134,6 +134,6 @@ def extract_text(path):
|
|||
elif ext == 'txt':
|
||||
text = txt.extract_text(path)
|
||||
except:
|
||||
logger.debug('failed to extract text from %s', path, exc_info=1)
|
||||
logger.debug('failed to extract text from %s', path, exc_info=True)
|
||||
text = ''
|
||||
return text
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def info(opf):
|
|||
with open(opf, 'rb') as fd:
|
||||
opf = ET.fromstring(fd.read().decode())
|
||||
except:
|
||||
logger.debug('failed to load opf %s', opf, exc_info=1)
|
||||
logger.debug('failed to load opf %s', opf, exc_info=True)
|
||||
return data
|
||||
ns = '{http://www.idpf.org/2007/opf}'
|
||||
metadata = opf.findall(ns + 'metadata')[0]
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ def info(pdf):
|
|||
if value and _key not in data:
|
||||
data[_key] = value
|
||||
except:
|
||||
logger.debug('FAILED TO PARSE %s', pdf, exc_info=1)
|
||||
logger.debug('FAILED TO PARSE %s', pdf, exc_info=True)
|
||||
|
||||
'''
|
||||
cmd = ['pdfinfo', pdf]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue