Skip to content
Permalink
Browse files

Gracefully handle import errors in console

Fixes opening the console when 3d library is not built

Fixes #41855
  • Loading branch information
nyalldawson committed Apr 3, 2021
1 parent cb6981d commit 12905ccf4e9486b3f0ad7f0cecd9b68a4c0b2c15
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/console/console_sci.py
@@ -67,7 +67,10 @@ def __init__(self, parent=None):
self.displayPrompt(self.continuationLine)

for line in _init_commands:
self.runsource(line)
try:
self.runsource(line)
except ModuleNotFoundError:
pass

self.history = []
self.softHistory = ['']

0 comments on commit 12905cc

Please sign in to comment.