mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-07 04:53:37 -04:00
a229adb19a
By default some Python warning messages would be written to standard error by the interpreter. To prevent these warnings from making a mess of the ELinks screen, all warnings were turned into exceptions so they could be caught and displayed through the usual report_scripting_error() mechanism. With Python 3.2, this approach backfires: A new class of ResourceWarnings that are filtered by default (and hence would *not* have been written to standard error) are now turned into exceptions, and these exceptions can't be caught because they're emitted from the interpreter's cleanup code. As a result, the uncaught exceptions would make a mess of the ELinks screen. The new solution is to replace Python's standard library function warnings.showwarning() with one that turns warning messages into exceptions. This means we'll wait until a warning would have been written to standard error before turning it into an exception, so other warnings that would never have reached that point because they're filtered will remain unseen. (The behavior of warning messages is described in the documentation for the "warnings" module from Python's standard library.) |
||
---|---|---|
.. | ||
core.c | ||
core.h | ||
dialogs.c | ||
dialogs.h | ||
document.c | ||
document.h | ||
hooks.c | ||
hooks.h | ||
keybinding.c | ||
keybinding.h | ||
load.c | ||
load.h | ||
Makefile | ||
menu.c | ||
menu.h | ||
open.c | ||
open.h | ||
python.c | ||
python.h |