Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d021ef0

Browse files
committed
Don't call sys.exit if objc can't be imported. It makes it impossible for nose to collect tests across all of matplotlib. Addresses #571.
1 parent 0cfea91 commit d021ef0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/matplotlib/backends/backend_cocoaagg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818

1919
try:
2020
import objc
21-
except:
22-
print >>sys.stderr, 'The CococaAgg backend required PyObjC to be installed!'
23-
print >>sys.stderr, ' (currently testing v1.3.7)'
24-
sys.exit()
21+
except ImportError:
22+
raise ImportError('The CococaAgg backend required PyObjC to be installed!')
2523

2624
from Foundation import *
2725
from AppKit import *

0 commit comments

Comments
 (0)