diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-07-13 23:00:38 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-07-14 19:49:08 +0200 |
commit | 4884c74625c1fec7fe2315cbb2ea50b4d0cc991b (patch) | |
tree | 0768c4d10805290fafb126c31945e93e414682dd | |
parent | aa9154ea51152de56d8eaa825f1ab23a62d44ec6 (diff) | |
download | clufter-4884c74625c1fec7fe2315cbb2ea50b4d0cc991b.tar.gz clufter-4884c74625c1fec7fe2315cbb2ea50b4d0cc991b.tar.xz clufter-4884c74625c1fec7fe2315cbb2ea50b4d0cc991b.zip |
format: avoid duplicate "swallow" (+validation, ...)
Also fixes assertion error for two equal (but non-identical) tuples
later on.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r-- | format.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -308,7 +308,8 @@ class Format(object): produced = producer(protocol, *args, **kwargs) if produced is None: continue - if that_cls is self.__class__: + if (that_cls is self.__class__ + and protocol not in self._representations): # computed -> stored normalization self.swallow(protocol, *arg2wrapped(produced)) else: |