From eed682f5c134f993b0f0946ffb08a0c9bd64052b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 29 Dec 2007 09:58:56 +0000 Subject: * 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 --- pym/portage/dbapi/virtual.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/portage/dbapi/virtual.py') 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 = {} -- cgit v1.2.3-1-g7c22