From 17eb99eea718191b619277754bf15e6a7554d916 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Fri, 3 Sep 2010 18:01:43 +0000 Subject: python 3 only. Fixes all EncodingError bugs :)))) --- src/poezio.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/poezio.py') diff --git a/src/poezio.py b/src/poezio.py index 22af358e..27bc359a 100644 --- a/src/poezio.py +++ b/src/poezio.py @@ -1,5 +1,4 @@ -#!/usr/bin/python -# -*- coding:utf-8 -*- +#!/usr/bin/env python3 # # Copyright 2010 Le Coz Florent # @@ -42,21 +41,21 @@ class MyStdErr(object): sys.stderr.close() sys.stderr = self.old_stderr -my_stderr = MyStdErr(open('/dev/null', 'a')) +# my_stderr = MyStdErr(open('/dev/null', 'a')) -def exception_handler(type_, value, trace): - """ - on any traceback: exit ncurses and print the traceback - then exit the program - """ - my_stderr.restaure() - curses.endwin() - curses.echo() - traceback.print_exception(type_, value, trace, None, sys.stderr) - import os # used to quit the program even from a thread - os.abort() +# def exception_handler(type_, value, trace): +# """ +# on any traceback: exit ncurses and print the traceback +# then exit the program +# """ +# my_stderr.restaure() +# curses.endwin() +# curses.echo() +# traceback.print_exception(type_, value, trace, None, sys.stderr) +# import os # used to quit the program even from a thread +# os.abort() -sys.excepthook = exception_handler +# sys.excepthook = exception_handler import signal -- cgit v1.2.3