From: Armin Ronacher Date: Sun, 1 Apr 2007 12:35:21 +0000 (+0200) Subject: [svn] fixed bug in CacheDict for python2.4 X-Git-Tag: 2.0rc1~377 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6fa4ae708fd165ae189709bdf104746216eed98d;p=jinja2.git [svn] fixed bug in CacheDict for python2.4 --HG-- branch : trunk --- 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