File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1463,7 +1463,7 @@ def backend_gtk3agg_internal_check(x):
14631463
14641464 try :
14651465 from gi .repository import Gtk , Gdk , GObject
1466- except ImportError :
1466+ except ( ImportError , RuntimeError ) :
14671467 return (False , "Requires pygobject to be installed." )
14681468
14691469 return (True , "version %s.%s.%s" % (
@@ -1489,9 +1489,14 @@ def check(self):
14891489 p = multiprocessing .Pool ()
14901490 except :
14911491 return "unknown (can not use multiprocessing to determine)"
1492- success , msg = p .map (backend_gtk3agg_internal_check , [0 ])[0 ]
1493- p .close ()
1494- p .join ()
1492+ try :
1493+ success , msg = p .map (backend_gtk3agg_internal_check , [0 ])[0 ]
1494+ except :
1495+ success = False
1496+ msg = "Could not determine"
1497+ finally :
1498+ p .close ()
1499+ p .join ()
14951500 if success :
14961501 BackendAgg .force = True
14971502
@@ -1521,7 +1526,7 @@ def backend_gtk3cairo_internal_check(x):
15211526
15221527 try :
15231528 from gi .repository import Gtk , Gdk , GObject
1524- except ImportError :
1529+ except ( RuntimeError , ImportError ) :
15251530 return (False , "Requires pygobject to be installed." )
15261531
15271532 return (True , "version %s.%s.%s" % (
You can’t perform that action at this time.
0 commit comments