summaryrefslogtreecommitdiff
path: root/grc/core/Config.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core/Config.py')
-rw-r--r--grc/core/Config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/grc/core/Config.py b/grc/core/Config.py
index cc199a348f..eb53e1751d 100644
--- a/grc/core/Config.py
+++ b/grc/core/Config.py
@@ -1,5 +1,4 @@
-"""
-Copyright 2016 Free Software Foundation, Inc.
+"""Copyright 2016 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -32,6 +31,8 @@ class Config(object):
hier_block_lib_dir = os.environ.get('GRC_HIER_PATH', Constants.DEFAULT_HIER_BLOCK_LIB_DIR)
+ yml_block_cache = os.path.expanduser('~/.cache/grc_gnuradio') # FIXME: remove this as soon as converter is stable
+
def __init__(self, version, version_parts=None, name=None, prefs=None):
self._gr_prefs = prefs if prefs else DummyPrefs()
self.version = version
@@ -39,6 +40,9 @@ class Config(object):
if name:
self.name = name
+ if not os.path.exists(self.yml_block_cache):
+ os.mkdir(self.yml_block_cache)
+
@property
def block_paths(self):
path_list_sep = {'/': ':', '\\': ';'}[os.path.sep]
@@ -46,6 +50,7 @@ class Config(object):
paths_sources = (
self.hier_block_lib_dir,
os.environ.get('GRC_BLOCKS_PATH', ''),
+ self.yml_block_cache,
self._gr_prefs.get_string('grc', 'local_blocks_path', ''),
self._gr_prefs.get_string('grc', 'global_blocks_path', ''),
)