blob: a5ed29ce1f9d4297c92acf33f6c541ec54f077f7 [file] [log] [blame]
Vasil Velichkov8f4b5ba2018-04-24 18:36:57 +03001--- /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py 2018-04-23 17:29:19.555209060 +0000
2+++ /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py 2018-04-23 17:32:53.448304174 +0000
3@@ -47,14 +47,19 @@
4 def _init():
5 import sys
6
7- sys_path = sys.path[:]
8+ try:
9+ sys_path = sys.path[:]
10
11- _gtk.init_check()
12-
13- # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''),
14- # which causes problems for pychecker, restore it if modified.
15- if sys.path != sys_path:
16- sys.path[:] = sys_path
17+ try:
18+ _gtk.init_check()
19+ except RuntimeError, e:
20+ import warnings
21+ warnings.warn(str(e), _gtk.Warning)
22+ finally:
23+ # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''),
24+ # which causes problems for pychecker, restore it if modified.
25+ if sys.path != sys_path:
26+ sys.path[:] = sys_path
27
28 # install the default log handlers
29 _gtk.add_log_handlers()
30