diff options
Diffstat (limited to 'grc/core/platform.py')
-rw-r--r-- | grc/core/platform.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/grc/core/platform.py b/grc/core/platform.py index 8ba473a2cc..02cb385e57 100644 --- a/grc/core/platform.py +++ b/grc/core/platform.py @@ -179,7 +179,20 @@ class Platform(Element): self._docstring_extractor.finish() # self._docstring_extractor.wait() - utils.hide_bokeh_gui_options_if_not_installed(self.blocks['options']) + if 'options' not in self.blocks: + # we didn't find one of the built-in blocks ("options") + # which probably means the GRC blocks path is bad + errstr = ( + "Failed to find built-in GRC blocks (specifically, the " + "'options' block). Ensure your GRC block paths are correct " + "and at least one points to your prefix installation:" + ) + errstr = "\n".join([errstr] + (path or self.config.block_paths)) + raise RuntimeError(errstr) + else: + # might have some cleanup to do on the options block in particular + utils.hide_bokeh_gui_options_if_not_installed(self.blocks['options']) + def _iter_files_in_block_path(self, path=None, ext='yml'): """Iterator for block descriptions and category trees""" |