[Code-review] [PATCH] Detect, log, and work around errors that occur during module preloading.
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Thu Apr 24 20:40:41 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Stone wrote:
| + if self.preloader_hint:
| + try:
| + import gtk
| + display = gtk.gdk.display_get_default()
| + display.close() # This needs to happen after importing
s.g.style
| + except:
| + print 'Exception when preloading module: gtk'
| + self.preloader_hint = False
| + util.trace()
This looks good. I'm not entirely sure why you separated out gtk from the
other imports, but wrapping each import in a try block seems like
precisely the right solution for now.
- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIESiJUJT6e6HFtqQRAsm+AJ9X2juXHOWNkg2KKA63ilHdtNkE5QCcDPzF
PIk0YCYAGDO/AM2RZXBmMmQ=
=Dke+
-----END PGP SIGNATURE-----
More information about the Code-review
mailing list