New submission from Kristján Valur Jónsson <krist...@ccpgames.com>:

Reporting an error early in the python startup, before importing is properly 
initialized, can be tricky.
For example, here:

if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
  Py_FatalError("Py_Initialize: can't import _frozen_importlib");

The problem is, that _Py_DisplaySourceLine will set an exception because it 
cannot import the io module.  And this will terminate the traceback output.

The attached patch aims to rectify it by ignoring errors from this api in 
traceback.c

----------
components: Interpreter Core
files: traceback.patch
keywords: patch
messages: 165585
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: Traceback reporting can fail if IO cannot be imported
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26393/traceback.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15365>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to