diff --git a/bin/tools/yaml_tag.py b/bin/tools/yaml_tag.py index 648fd56206e..e12aecdcd96 100644 --- a/bin/tools/yaml_tag.py +++ b/bin/tools/yaml_tag.py @@ -4,7 +4,7 @@ import logging class YamlTag(object): """ Superclass for constructors of custom tags defined in yaml file. - __str__ are overriden in subclass and used for serialization in module recorder. + __str__ is overriden in subclass and used for serialization in module recorder. """ def __init__(self, **kwargs): self.__dict__.update(kwargs) @@ -89,14 +89,14 @@ class Eval(YamlTag): self.expression = expression super(Eval, self).__init__() def __str__(self): - return 'eval(%s)' % (str(self.expr,)) + return '!eval %s' % str(self.expression) class Ref(YamlTag): def __init__(self, expr="False", *args, **kwargs): self.expr = expr super(Ref, self).__init__(*args, **kwargs) def __str__(self): - return 'ref(%s)' % (str(self.expr,)) + return 'ref(%s)' % repr(self.expr) class IrSet(YamlTag): def __init__(self):