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

Skip to content

Commit ed2767c

Browse files
committed
Move import of traceback to only occur in the event of an exception.
svn path=/trunk/matplotlib/; revision=8729
1 parent 0c2ac6d commit ed2767c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ def hitlist(self, event):
239239
"""
240240
List the children of the artist which contain the mouse event *event*.
241241
"""
242-
import traceback
243242
L = []
244243
try:
245244
hascursor,info = self.contains(event)
246245
if hascursor:
247246
L.append(self)
248247
except:
248+
import traceback
249249
traceback.print_exc()
250250
print "while checking",self.__class__
251251

0 commit comments

Comments
 (0)