Skip to content

Commit f7579cb

Browse files
committed
Only mock tornado is micropip is available
Also, use a more specific error exception
1 parent 372834a commit f7579cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipympl/backend_nbagg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
# solution than a non-working solution here.
1111
try:
1212
import micropip # noqa
13-
except ImportError:
13+
1414
sys.modules['tornado'] = types.ModuleType('tornadofake')
15+
except ModuleNotFoundError:
16+
pass
1517

1618
import io
1719
import json

0 commit comments

Comments
 (0)