diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-29 09:58:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-29 09:58:56 +0000 |
commit | eed682f5c134f993b0f0946ffb08a0c9bd64052b (patch) | |
tree | 159af1f0da2abed3e6616fa507a8f9ba6c954135 /pym/portage/dbapi/virtual.py | |
parent | a183e7baa09846bbbed488875db7138ee7402e68 (diff) | |
download | portage-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.py | 4 |
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 = {} |