-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added try except blocks around each filter import in ExamplePlugin
* If one filter has a syntax error it now does not prevent the rest of the plugin from loading. Most useful for plugin development Signed-off-by: Jared Duffey <[email protected]>
- Loading branch information
1 parent
7bdab07
commit 1c8f8c0
Showing
2 changed files
with
55 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
from ExamplePlugin.Plugin import ExamplePlugin | ||
|
||
from ExamplePlugin.ExampleFilter1 import ExampleFilter1 | ||
from ExamplePlugin.ExampleFilter2 import ExampleFilter2 | ||
from ExamplePlugin.CreateArray import CreateArrayFilter | ||
from ExamplePlugin.InitializeData import InitializeDataPythonFilter | ||
from ExamplePlugin.TemplateFilter import TemplateFilter | ||
__all__ = ['ExamplePlugin', 'get_plugin'] | ||
|
||
try: | ||
from ExamplePlugin.ExampleFilter1 import ExampleFilter1 | ||
__all__.append('ExampleFilter1') | ||
except ImportError: | ||
pass | ||
try: | ||
from ExamplePlugin.ExampleFilter2 import ExampleFilter2 | ||
__all__.append('ExampleFilter2') | ||
except ImportError: | ||
pass | ||
try: | ||
from ExamplePlugin.CreateArray import CreateArrayFilter | ||
__all__.append('CreateArrayFilter') | ||
except ImportError: | ||
pass | ||
try: | ||
from ExamplePlugin.InitializeData import InitializeDataPythonFilter | ||
__all__.append('InitializeDataPythonFilter') | ||
except ImportError: | ||
pass | ||
try: | ||
from ExamplePlugin.TemplateFilter import TemplateFilter | ||
__all__.append('TemplateFilter') | ||
except ImportError: | ||
pass | ||
|
||
# FILTER_INCLUDE_INSERT | ||
|
||
def get_plugin(): | ||
return ExamplePlugin() | ||
|
||
__all__ = ['ExamplePlugin','ExampleFilter1', 'ExampleFilter2', 'CreateArrayFilter', 'InitializeDataPythonFilter', 'TemplateFilter', 'get_plugin'] # FILTER_NAME_INSERT | ||
|