Improved traceback for a logger.error() message.
- Legacy-Id: 13093
This commit is contained in:
parent
8f3914e9e1
commit
d3558524f2
|
@ -420,7 +420,8 @@ class DocumentInfo(models.Model):
|
|||
with open(path, 'rb') as file:
|
||||
raw = file.read()
|
||||
except IOError as e:
|
||||
logger.error("IOError for %s: %s", path, e, exc_info=e)
|
||||
import sys
|
||||
logger.error("IOError for %s: %s", path, e, exc_info=sys.exc_info())
|
||||
return None
|
||||
try:
|
||||
text = raw.decode('utf-8')
|
||||
|
|
Loading…
Reference in a new issue