Skip to content

Commit d355852

Browse files
committed
Improved traceback for a logger.error() message.
- Legacy-Id: 13093
1 parent 8f3914e commit d355852

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/doc/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ def text(self):
420420
with open(path, 'rb') as file:
421421
raw = file.read()
422422
except IOError as e:
423-
logger.error("IOError for %s: %s", path, e, exc_info=e)
423+
import sys
424+
logger.error("IOError for %s: %s", path, e, exc_info=sys.exc_info())
424425
return None
425426
try:
426427
text = raw.decode('utf-8')

0 commit comments

Comments
 (0)