mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	Changed the postgres version getting code to use cursor.fetchone() instead of dictfetchone(); some versions (including mine) of psycopg don't export dictfetch functions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -86,7 +86,7 @@ class DatabaseWrapper(local): | ||||
|         global postgres_version | ||||
|         if not postgres_version: | ||||
|             cursor.execute("SELECT version()") | ||||
|             postgres_version = [int(val) for val in cursor.dictfetchone()['version'].split()[1].split('.')]         | ||||
|             postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]         | ||||
|         if settings.DEBUG: | ||||
|             return util.CursorDebugWrapper(cursor, self) | ||||
|         return cursor | ||||
|   | ||||
| @@ -54,7 +54,7 @@ class DatabaseWrapper(local): | ||||
|         global postgres_version | ||||
|         if not postgres_version: | ||||
|             cursor.execute("SELECT version()") | ||||
|             postgres_version = [int(val) for val in cursor.dictfetchone()['version'].split()[1].split('.')]         | ||||
|             postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]         | ||||
|         if settings.DEBUG: | ||||
|             return util.CursorDebugWrapper(cursor, self) | ||||
|         return cursor | ||||
|   | ||||
		Reference in New Issue
	
	Block a user