From 0f428905d82bf9e7a4f5b80e121558e436624211 Mon Sep 17 00:00:00 2001 From: Julien Thewys Date: Tue, 26 Oct 2010 11:45:09 +0200 Subject: [PATCH] [FIX] Fixed yaml custom tags refactoring from base_module_record. Serialization for those tags have probably not been used yet. bzr revid: jth@openerp.com-20101026094509-s34a7et489f7qy3y --- bin/tools/yaml_tag.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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):