Skip to content

Commit

Permalink
Gracefully handle import errors in console
Browse files Browse the repository at this point in the history
Fixes opening the console when 3d library is not built

Fixes #41855
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Apr 3, 2021
1 parent 2d4f73d commit 5b5c258
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/console/console_sci.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def __init__(self, parent=None):
self.displayPrompt(self.continuationLine) self.displayPrompt(self.continuationLine)


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


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

0 comments on commit 5b5c258

Please sign in to comment.