diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-08-30 18:23:45 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-08-30 18:23:45 +0200 |
commit | 0637b6b97fec94799c3733e8b20519456814fce8 (patch) | |
tree | 026d15d66afec93ab5046bea50faab6c5b5d90b1 /hyperkitty/lib | |
parent | ec7da1aac20a01838d30e02d550c13b22414be73 (diff) | |
download | hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.tar.gz hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.tar.xz hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.zip |
Normalize tabs to spaces
Diffstat (limited to 'hyperkitty/lib')
-rw-r--r-- | hyperkitty/lib/__init__.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py index d6ad4aa..887cfd5 100644 --- a/hyperkitty/lib/__init__.py +++ b/hyperkitty/lib/__init__.py @@ -12,16 +12,19 @@ import kittystore class ThreadSafeStorePool(object): - - def __init__(self): - self._local = threading.local() - - def get(self): - try: - return self._local.store - except AttributeError: - self._local.store = kittystore.get_store(settings.KITTYSTORE_URL, debug=False) - return self._local.store + """ + http://unpythonic.blogspot.fr/2007/11/using-storm-and-sqlite-in-multithreaded.html + """ + + def __init__(self): + self._local = threading.local() + + def get(self): + try: + return self._local.store + except AttributeError: + self._local.store = kittystore.get_store(settings.KITTYSTORE_URL, debug=False) + return self._local.store def gravatar_url(email): |