summaryrefslogtreecommitdiffstats
path: root/forum_modules
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-18 15:18:35 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-18 15:18:35 -0400
commit3cb6d424e8995a43d0cf5ba1e2d997712ca82d49 (patch)
treeb539e68918e5fc87788c2a3918a5f37e74af7adc /forum_modules
parentbfe490e8ffcc6a84330aab3b2a1b856ce277c0ca (diff)
downloadaskbot-3cb6d424e8995a43d0cf5ba1e2d997712ca82d49.tar.gz
askbot-3cb6d424e8995a43d0cf5ba1e2d997712ca82d49.tar.bz2
askbot-3cb6d424e8995a43d0cf5ba1e2d997712ca82d49.zip
small python 2.4 compat fix and documentation
Diffstat (limited to 'forum_modules')
-rw-r--r--forum_modules/pgfulltext/management.py11
1 files changed, 6 insertions, 5 deletions
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()