diff options
author | Andrej Rode <mail@andrejro.de> | 2018-06-23 17:44:58 +0200 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2018-06-23 17:44:58 +0200 |
commit | 5e07e65fe9350a51cd45f8f21cfa6bf144e42e1c (patch) | |
tree | b88dde44a0ba1f2ce1b382bbca02e80050f77a17 /grc/core/utils/__init__.py | |
parent | 9f7e39ee5141791f93dbc1c842b1d1a49e33b068 (diff) | |
parent | e82e337d0c74fa7ea5e8b8429de29bec43818552 (diff) |
Merge branch 'python3_fix' into python3_merge
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) + |