From dfa7b75d4f631b41c86ea8ef8a226f5239d57e7f Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 2 Feb 2010 16:33:02 +0100 Subject: [PATCH] [entropy.db] EntropyRepository: implement basic __hash__ builtin method --- libraries/entropy/db/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index eaad98945..5264022ab 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -520,7 +520,6 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface): self.initializeDatabase() return cursor - def _connection(self): self._cleanup_stale_cur_conn() c_key = self._get_cur_th_key() @@ -552,6 +551,9 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface): def __unicode__(self): return self.__show_info() + def __hash__(self): + return id(self) + def setCacheSize(self, size): """ Change low-level, storage engine based cache size.