From 05189a61e9d3619576ab0fd163136850ab1142c5 Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Wed, 28 Mar 2007 20:55:46 +0000 Subject: [PATCH] boulder-oracle-sprint: Fixed #3835 by making CursorDebugWrapper iterable, as it should have been. git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4840 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django/db/backends/util.py b/django/db/backends/util.py index 965d9dcc6d..18e2528075 100644 --- a/django/db/backends/util.py +++ b/django/db/backends/util.py @@ -33,6 +33,9 @@ class CursorDebugWrapper(object): 'time': "%.3f" % (stop - start), }) + def __iter__(self): + return self.cursor.__iter__() + def __getattr__(self, attr): if self.__dict__.has_key(attr): return self.__dict__[attr] @@ -98,9 +101,9 @@ def truncate_name(name, length=None): """ if length is None or len(name) <= length: return name - + hash = md5.md5(name).hexdigest()[:4] - + return '%s%s' % (name[:length-4], hash) ##################################################################################