Comment 5 for bug 545050

Revision history for this message
GuilhemBichot (guilhem-bichot) wrote :

Hello Martin, I get the same warning as you, which is ok (we can live with the warning; the revision has been uncommitted).
But my colleague, who is using python 2.4, and a gtk module with versions:
 gtk version is (2,10,4)
 pygtk version is (2,10,1)
still sees the stack trace and exception. This is understandable:
his gtk/__init__.py has:
def _init():
...
    _gtk.init_check()
which fails and throws RuntimeError (we see it in the stack trace in a previous post).
Whereas my gtk/__init__.py has:
        try:
            _gtk.init_check()
        except RuntimeError, e:
            import warnings
            warnings.warn(str(e), _gtk.Warning)
which catches the exception and sends a warning instead.