summaryrefslogtreecommitdiff
path: root/grc/core/Platform.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-02-23 21:47:52 +0100
committerSebastian Koslowski <koslowski@kit.edu>2016-04-05 08:39:02 +0200
commit3201557bfbed7ad81e0e5a34ece48bbd93ad709b (patch)
treedd213153dad1c146fa177a818b355341ed59edfb /grc/core/Platform.py
parent7453e24321e6ca237ded87a6bbed8d645d2a6b53 (diff)
grc-refactor: move gui prefs to gui
Diffstat (limited to 'grc/core/Platform.py')
-rw-r--r--grc/core/Platform.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/grc/core/Platform.py b/grc/core/Platform.py
index f6bb756b4e..97e2b38309 100644
--- a/grc/core/Platform.py
+++ b/grc/core/Platform.py
@@ -51,11 +51,8 @@ class Config(object):
def __init__(self):
self.prefs = self._get_prefs()
- # Ensure hier and conf directories
if not exists(self.hier_block_lib_dir):
os.mkdir(self.hier_block_lib_dir)
- if not exists(dirname(Constants.PREFS_FILE)):
- os.mkdir(dirname(Constants.PREFS_FILE))
@staticmethod
def _get_prefs():
@@ -113,7 +110,6 @@ class Platform(Element):
callback_finished=lambda: self.block_docstrings_loaded_callback()
)
- self._block_paths = list(set(Constants.BLOCKS_DIRS))
self._block_dtd = Constants.BLOCK_DTD
self._default_flow_graph = Constants.DEFAULT_FLOW_GRAPH
@@ -124,8 +120,8 @@ class Platform(Element):
self.blocks = None
self._blocks_n = None
self._category_trees_n = None
- self.domains = dict()
- self.connection_templates = dict()
+ self.domains = {}
+ self.connection_templates = {}
self._auto_hier_block_generate_chain = set()
@@ -215,7 +211,7 @@ class Platform(Element):
def iter_xml_files(self):
"""Iterator for block descriptions and category trees"""
- for block_path in map(lambda x: os.path.abspath(os.path.expanduser(x)), self._block_paths):
+ for block_path in self.config.block_paths:
if os.path.isfile(block_path):
yield block_path
elif os.path.isdir(block_path):
@@ -371,6 +367,3 @@ class Platform(Element):
def get_colors(self):
return [(name, color) for name, key, sizeof, color in Constants.CORE_TYPES]
-
- def get_block_paths(self):
- return self._block_paths