[Python-modules-commits] r4472 - in packages/python-django/trunk/debian (2 files)
brettp-guest at users.alioth.debian.org
brettp-guest at users.alioth.debian.org
Wed Feb 6 16:08:25 UTC 2008
Date: Wednesday, February 6, 2008 @ 16:08:24
Author: brettp-guest
Revision: 4472
django svn snapshot postgresql fix
Added:
packages/python-django/trunk/debian/patches/04_pg_version_fix.diff
Modified:
packages/python-django/trunk/debian/changelog
Modified: packages/python-django/trunk/debian/changelog
===================================================================
--- packages/python-django/trunk/debian/changelog 2008-02-05 22:09:55 UTC (rev 4471)
+++ packages/python-django/trunk/debian/changelog 2008-02-06 16:08:24 UTC (rev 4472)
@@ -1,3 +1,9 @@
+python-django (0.97~svn7047-2) experimental; urgency=low
+
+ * Patch for postgresql version issue with 8.3 beta/rc releases
+
+ -- Brett Parker <iDunno at sommitrealweird.co.uk> Wed, 6 Feb 2008 15:15:37 +0000
+
python-django (0.97~svn7047-1) experimental; urgency=low
* New upstream snapshot (rev 7047)
Added: packages/python-django/trunk/debian/patches/04_pg_version_fix.diff
===================================================================
--- packages/python-django/trunk/debian/patches/04_pg_version_fix.diff (rev 0)
+++ packages/python-django/trunk/debian/patches/04_pg_version_fix.diff 2008-02-06 16:08:24 UTC (rev 4472)
@@ -0,0 +1,26 @@
+--- django/db/backends/postgresql/operations.py.orig
++++ django/db/backends/postgresql/operations.py
+@@ -12,7 +12,22 @@ class DatabaseOperations(BaseDatabaseOperations):
+ from django.db import connection
+ cursor = connection.cursor()
+ cursor.execute("SELECT version()")
+- self._postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
++ version_parts = cursor.fetchone()[0].split()[1].split('.')
++ postgres_version = []
++ for part in version_parts:
++ if part.isdigit():
++ postgres_version.append(int(part))
++ else:
++ digit = ""
++ for c in part:
++ if c.isdigit():
++ digit += c
++ else:
++ break
++ if digit != "":
++ postgres_version.append(int(digit))
++ break
++ self._postgres_version = postgres_version
+ return self._postgres_version
+ postgres_version = property(_get_postgres_version)
+
More information about the Python-modules-commits
mailing list