diff options
author | Sebastian Koslowski <sebastian.koslowski@gmail.com> | 2017-10-26 20:15:22 +0200 |
---|---|---|
committer | Sebastian Koslowski <sebastian.koslowski@gmail.com> | 2017-11-08 19:30:41 +0100 |
commit | 1fa89b3704d7f476e4395eb9358d5a6d7642251b (patch) | |
tree | bb553275eff3b791a5ac4482ed0e8355d5fce0b1 /grc/core/utils/__init__.py | |
parent | 865e2586b4f34fce101d8aa4a240431273009b8c (diff) |
grc: disable auto-conversion and implement json cache
Diffstat (limited to 'grc/core/utils/__init__.py')
-rw-r--r-- | grc/core/utils/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/grc/core/utils/__init__.py b/grc/core/utils/__init__.py index 660eb594a5..f2ac986fb4 100644 --- a/grc/core/utils/__init__.py +++ b/grc/core/utils/__init__.py @@ -17,5 +17,17 @@ from __future__ import absolute_import +import six + from . import epy_block_io, expr_utils, extract_docs, flow_graph_complexity from .hide_bokeh_gui_options_if_not_installed import hide_bokeh_gui_options_if_not_installed + + +def to_list(value): + if not value: + return [] + elif isinstance(value, six.string_types): + return [value] + else: + return list(value) + |