From d436e98474eadda52076d5c4316c0797ea45e136 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 9 Apr 2008 16:31:20 +0200 Subject: [PATCH] fixed deepcopy --HG-- branch : trunk --- jinja2/nodes.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jinja2/nodes.py b/jinja2/nodes.py index 911f9fc..00f6d62 100644 --- a/jinja2/nodes.py +++ b/jinja2/nodes.py @@ -120,14 +120,14 @@ class Node(object): new_value = value.copy() elif isinstance(value, list): new_value = [] - for item in new_value: + for item in value: if isinstance(item, Node): item = item.copy() else: item = copy(item) new_value.append(item) else: - new_value = copy(new_value) + new_value = copy(value) setattr(result, field, new_value) for attr in self.attributes: try: @@ -326,8 +326,6 @@ class Const(Literal): an `Impossible` exception.""" from compiler import has_safe_repr if not has_safe_repr(value): - if silent: - return raise Impossible() return cls(value, lineno=lineno, environment=environment) -- 2.26.2