From 99b8ef09b954c69492be95b68989d6d75b0446ee Mon Sep 17 00:00:00 2001 From: Håkon Vågsether <haakonsv@gmail.com> Date: Wed, 29 Aug 2018 17:25:11 +0200 Subject: grc: Fix problems with option_attributes Enabling the option_attributes to be accessed by the rest of the block's parameters by using a new string subtype. Also adding validation. --- grc/core/io/yaml.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'grc/core/io/yaml.py') diff --git a/grc/core/io/yaml.py b/grc/core/io/yaml.py index 29b4cb81d6..8efbc4865d 100644 --- a/grc/core/io/yaml.py +++ b/grc/core/io/yaml.py @@ -22,6 +22,7 @@ from collections import OrderedDict import six import yaml +from ..params.param import attributed_str class GRCDumper(yaml.SafeDumper): @classmethod @@ -79,6 +80,7 @@ GRCDumper.add_representer(ListFlowing, GRCDumper.represent_list_flowing) GRCDumper.add_representer(tuple, GRCDumper.represent_list) GRCDumper.add_representer(MultiLineString, GRCDumper.represent_ml_string) GRCDumper.add_representer(yaml.nodes.ScalarNode, lambda r, n: n) +GRCDumper.add_representer(attributed_str, GRCDumper.represent_str) def dump(data, stream=None, **kwargs): -- cgit v1.2.3