Commits

Lynn Rees  committed fde6d7e

- add clear

  • Participants
  • Parent commits e3acd83

Comments (0)

Files changed (2)

File shove/core.py

 
 from shove._imports import cache_backend, store_backend
 
-
 __all__ = 'Shove MultiShove'.split()
 
 
         self._store.update(self._buffer)
         self._buffer.clear()
 
+    def clear(self):
+        self._store.clear()
+        self._buffer.clear()
+
 
 class MultiShove(MutableMapping):
 

File shove/stores/hstore.py

 
 hstore://<host>:<port>/<db>/collection/
 '''
+from shove._compat import urlsplit
+from shove.store import BaseStore
+from stuf.six import items, values
+import logging
 
 try:
     import psycopg2
 except ImportError:
     raise ImportError('requires `psycopg2` library')
 
-from stuf.six import items, values
-
-from shove.store import BaseStore
-from shove._compat import urlsplit
-
 __all__ = ['HStore']
 
 
                 cursor_factory=extras.RealDictCursor
             )
         except psycopg2.OperationalError:
+            logging.exception('configuration error')
             raise TypeError('configuration error')
         try:
             db.execute('CREATE EXTENSION hstore')