summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/virtual.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-29 09:58:56 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-29 09:58:56 +0000
commiteed682f5c134f993b0f0946ffb08a0c9bd64052b (patch)
tree159af1f0da2abed3e6616fa507a8f9ba6c954135 /pym/portage/dbapi/virtual.py
parenta183e7baa09846bbbed488875db7138ee7402e68 (diff)
downloadportage-eed682f5c134f993b0f0946ffb08a0c9bd64052b.tar.gz
portage-eed682f5c134f993b0f0946ffb08a0c9bd64052b.tar.bz2
portage-eed682f5c134f993b0f0946ffb08a0c9bd64052b.zip
* Initialize dbapi._categories = None so that we can compare
with None instead of using hasattr. * Remove unwanted self._categories initialization from the portdbapi constructor. svn path=/main/trunk/; revision=9092
Diffstat (limited to 'pym/portage/dbapi/virtual.py')
-rw-r--r--pym/portage/dbapi/virtual.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dbapi/virtual.py b/pym/portage/dbapi/virtual.py
index 3d5472f1e..444b5363a 100644
--- a/pym/portage/dbapi/virtual.py
+++ b/pym/portage/dbapi/virtual.py
@@ -26,8 +26,8 @@ class fakedbapi(dbapi):
self._match_cache = {}
def _clear_cache(self):
- if hasattr(self, "_categories"):
- del self._categories
+ if self._categories is not None:
+ self._categories = None
if self._match_cache:
self._match_cache = {}