From: Armin Ronacher Date: Wed, 9 Apr 2008 14:31:20 +0000 (+0200) Subject: fixed deepcopy X-Git-Tag: 2.0rc1~194 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d436e98474eadda52076d5c4316c0797ea45e136;p=jinja2.git fixed deepcopy --HG-- branch : trunk --- 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)