From 6fa4ae708fd165ae189709bdf104746216eed98d Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 1 Apr 2007 14:35:21 +0200 Subject: [PATCH] [svn] fixed bug in CacheDict for python2.4 --HG-- branch : trunk --- jinja/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jinja/utils.py b/jinja/utils.py index dec5348..2b0a4cf 100644 --- a/jinja/utils.py +++ b/jinja/utils.py @@ -21,9 +21,9 @@ from jinja.nodes import Trans from jinja.datastructure import Context, TemplateData from jinja.exceptions import SecurityException, TemplateNotFound -try: +if sys.version_info >= (2, 5): from collections import deque -except ImportError: +else: deque = None #: number of maximal range items @@ -416,7 +416,7 @@ class CacheDict(object): if deque is not None: self._queue = deque() self._popleft = self._queue.popleft - # python2.3, just use a list + # python2.3/2.4, just use a list else: self._queue = [] pop = self._queue.pop -- 2.26.2