diff options
Diffstat (limited to 'grc/core/Platform.py')
-rw-r--r-- | grc/core/Platform.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/grc/core/Platform.py b/grc/core/Platform.py index 9956391055..7ef944b3aa 100644 --- a/grc/core/Platform.py +++ b/grc/core/Platform.py @@ -56,9 +56,6 @@ class Platform(Element): callback_finished=lambda: self.block_docstrings_loaded_callback() ) - self._block_dtd = Constants.BLOCK_DTD - self._default_flow_graph = Constants.DEFAULT_FLOW_GRAPH - self.blocks = {} self._blocks_n = {} self._block_categories = {} @@ -187,7 +184,7 @@ class Platform(Element): def load_block_xml(self, xml_file): """Load block description from xml file""" # Validate and import - ParseXML.validate_dtd(xml_file, self._block_dtd) + ParseXML.validate_dtd(xml_file, Constants.BLOCK_DTD) n = ParseXML.from_file(xml_file).get('block', {}) n['block_wrapper_path'] = xml_file # inject block wrapper path key = n.pop('key') @@ -291,8 +288,8 @@ class Platform(Element): nested data @throws exception if the validation fails """ - flow_graph_file = flow_graph_file or self._default_flow_graph - open(flow_graph_file, 'r') # Test open + flow_graph_file = flow_graph_file or self.config.default_flow_graph + open(flow_graph_file, 'r').close() # Test open ParseXML.validate_dtd(flow_graph_file, Constants.FLOW_GRAPH_DTD) return ParseXML.from_file(flow_graph_file) |