From 3cb6d424e8995a43d0cf5ba1e2d997712ca82d49 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 18 Apr 2010 15:18:35 -0400 Subject: small python 2.4 compat fix and documentation --- INSTALL | 3 +++ TODO.rst | 2 ++ forum_modules/pgfulltext/management.py | 11 ++++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/INSTALL b/INSTALL index fbc9c7b4..1eb9607c 100644 --- a/INSTALL +++ b/INSTALL @@ -66,6 +66,9 @@ http://south.aeracode.org/docs/installation.html Used for database schema and data migrations [sudo] easy_install South +EXTRA DEPENDENCIES FOR PYTHON 2.4 +* hashlib (made standard in python 2.5) + NOTES: django_authopenid is included into Askbot code and is significantly modified. http://code.google.com/p/django-authopenid/ no need to install this library diff --git a/TODO.rst b/TODO.rst index ba6dbdd2..f202a3f7 100644 --- a/TODO.rst +++ b/TODO.rst @@ -14,6 +14,8 @@ Code Cleanups inside forum app directory * one-by one convert "auto-discovery" modules into regular explicit python imports +* python2.4 incompatibilities + * datatime.datetime.strptime Bugs ====== diff --git a/forum_modules/pgfulltext/management.py b/forum_modules/pgfulltext/management.py index 487580ff..15ba3bd7 100644 --- a/forum_modules/pgfulltext/management.py +++ b/forum_modules/pgfulltext/management.py @@ -18,11 +18,12 @@ def install_pg_fts(): f = open(os.path.join(os.path.dirname(__file__), 'pg_fts_install.sql'), 'r') try: - cursor = connection.cursor() - cursor.execute(f.read()) - transaction.commit_unless_managed() - except: - pass + try: + cursor = connection.cursor() + cursor.execute(f.read()) + transaction.commit_unless_managed() + except: + pass finally: cursor.close() -- cgit v1.2.3-1-g7c22