Permalink
Browse files

Be a bit more careful when resetting connections in the multiprocessi…

…ng updater. Fixes #562.
  • Loading branch information...
jezdez committed Dec 13, 2012
1 parent 9d92d4d commit f94c69912ea4c64785452af1504f5d49cc9863c7
Showing with 4 additions and 1 deletion.
  1. +4 −1 haystack/management/commands/update_index.py
@@ -30,7 +30,10 @@ def worker(bits):
if not 'sqlite3' in info['ENGINE']:
try:
db.close_connection()
- del(connections._connections[alias])
+ if isinstance(connections._connections, dict):
+ del(connections._connections[alias])
+ else:
+ delattr(connections._connections, alias)
except KeyError:
pass

0 comments on commit f94c699

Please sign in to comment.