From 00717da5aa70a887c2c8432028f82ef771ed6de6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 2 Oct 2006 18:07:04 +0000 Subject: [PATCH] - go back to raising an exception when importing gtk fails (#208608) --- pygtk-nodisplay-exception.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pygtk-nodisplay-exception.patch diff --git a/pygtk-nodisplay-exception.patch b/pygtk-nodisplay-exception.patch new file mode 100644 index 0000000..8ddc466 --- /dev/null +++ b/pygtk-nodisplay-exception.patch @@ -0,0 +1,29 @@ +--- pygtk-2.10.1/gtk/__init__.py.display 2006-10-02 14:02:47.000000000 -0400 ++++ pygtk-2.10.1/gtk/__init__.py 2006-10-02 14:03:16.000000000 -0400 +@@ -59,19 +59,14 @@ + def _init(): + import sys + +- try: +- sys_path = sys.path[:] ++ sys_path = sys.path[:] + +- try: +- _gtk.init_check() +- except RuntimeError, e: +- import warnings +- warnings.warn(str(e), _gtk.Warning) +- finally: +- # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''), +- # which causes problems for pychecker, restore it if modified. +- if sys.path != sys_path: +- sys.path = sys_path ++ _gtk.init_check() ++ ++ # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''), ++ # which causes problems for pychecker, restore it if modified. ++ if sys.path != sys_path: ++ sys.path = sys_path + + # install the default log handlers + _gtk.add_log_handlers()