diff options
| author | Aymeric Augustin | 2013-12-15 14:54:36 +0100 | 
|---|---|---|
| committer | Aymeric Augustin | 2013-12-15 14:54:36 +0100 | 
| commit | ba5af8f6fe7836eef0a0c85dd1e6d7418bc87f75 (patch) | |
| tree | 7528a754a8e49fb7786eeb62f4690640c77e7cb9 /debug_toolbar/toolbar.py | |
| parent | 38de94d2d6586c716256838e41abe518898030d6 (diff) | |
| download | django-debug-toolbar-ba5af8f6fe7836eef0a0c85dd1e6d7418bc87f75.tar.bz2 | |
Fix #499 - Regression from 810a2fbc.
Diffstat (limited to 'debug_toolbar/toolbar.py')
| -rw-r--r-- | debug_toolbar/toolbar.py | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/debug_toolbar/toolbar.py b/debug_toolbar/toolbar.py index ec840dd..53b3182 100644 --- a/debug_toolbar/toolbar.py +++ b/debug_toolbar/toolbar.py @@ -89,9 +89,12 @@ class DebugToolbar(object):          cls = type(self)          cls._store[self.store_id] = self          for _ in range(len(cls._store) - self.config['RESULTS_STORE_SIZE']): -            # When we drop support for Python 2.6 and switch to -            # collections.OrderedDict, use popitem(last=False). -            del cls._store[cls._store.keyOrder[0]] +            try: +                # collections.OrderedDict +                cls._store.popitem(last=False) +            except TypeError: +                # django.utils.datastructures.SortedDict +                del cls._store[cls._store.keyOrder[0]]      @classmethod      def fetch(cls, store_id): | 
