diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-08-09 21:15:56 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-08-09 21:18:29 +0200 |
commit | 8e2886dc6b45b4e3f68d84887f728483fd2d1538 (patch) | |
tree | e682bbea9e329c80ebc66233d58a01a1306bddbd /grc/core/Platform.py | |
parent | cbe1e43b0f0d1ee0d356b7110700400578855ac6 (diff) | |
parent | fc1a6a88483120921936e415aba4d5d1a9b42d96 (diff) |
Merge remote-tracking branch 'upstream/next' into gtk3
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) |