[Checkins] SVN: relstorage/trunk/relstorage/pylibmc_wrapper.py Use pylibmc >= 0.9, which finally provides proper exceptions

Shane Hathaway shane at hathawaymix.org
Tue Nov 17 03:34:26 EST 2009


Log message for revision 105748:
  Use pylibmc >= 0.9, which finally provides proper exceptions
  

Changed:
  U   relstorage/trunk/relstorage/pylibmc_wrapper.py

-=-
Modified: relstorage/trunk/relstorage/pylibmc_wrapper.py
===================================================================
--- relstorage/trunk/relstorage/pylibmc_wrapper.py	2009-11-17 08:33:50 UTC (rev 105747)
+++ relstorage/trunk/relstorage/pylibmc_wrapper.py	2009-11-17 08:34:26 UTC (rev 105748)
@@ -18,19 +18,9 @@
 """
 
 import pylibmc
+from _pylibmc import MemcachedError  # pylibmc >= 0.9
 
-# Get the MemcachedError class.  XXX Report to the pylibmc author that
-# pylibmc should at least export the exception class!
-_c = pylibmc.Client([])
-try:
-    _c.get('foo')
-except Exception, e:
-    MemcachedError = type(e)
-    del _c
-else:
-    raise ImportError("Could not get MemcachedError")
 
-
 class Client(object):
 
     def __init__(self, servers):



More information about the checkins mailing list