Commit 1dca6f57 authored by Laurent MEYER's avatar Laurent MEYER

* While setting the log level of sub modules, catch non existent module...

* While setting the log level of sub modules, catch non existent module exception. All the listed module may not be loaded (such as llvm on windows)
parent 4de29558
......@@ -1770,12 +1770,15 @@ def opengeode():
# Set log level for all libraries
LOG.setLevel(level)
for module in (sdlSymbols, genericSymbols, ogAST, ogParser, Lander,
AdaGenerator, undoCommands, Renderer, Clipboard, Statechart,
Helper, LlvmGenerator, Asn1scc, Connectors):
module.LOG.addHandler(handler_console)
module.LOG.setLevel(level)
try:
for module in (sdlSymbols, genericSymbols, ogAST, ogParser, Lander,
AdaGenerator, undoCommands, Renderer, Clipboard, Statechart,
Helper, LlvmGenerator, Asn1scc, Connectors):
module.LOG.addHandler(handler_console)
module.LOG.setLevel(level)
except NameError:
# Some modules may not be loaded (like llvm on Windows)
pass;
# Initialize the clipboard
Clipboard.CLIPBOARD = SDL_Scene(context='clipboard')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment