diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-09 23:04:24 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-09 23:04:24 -0800 |
commit | 716ad204d2107092704e4188f3a73736ec836d44 (patch) | |
tree | 1737cc6bdccf8527bdf0e9bdc6d42aa40fb6232b | |
parent | config: set PORTAGE_OVERRIDE_EPREFIX for subprocs (diff) | |
download | portage-716ad204d2107092704e4188f3a73736ec836d44.tar.gz portage-716ad204d2107092704e4188f3a73736ec836d44.tar.bz2 portage-716ad204d2107092704e4188f3a73736ec836d44.zip |
Make portdbapi.eclassdb a property.
-rw-r--r-- | pym/portage/dbapi/porttree.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index e483edb93..233a2c1d1 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -59,6 +59,13 @@ class portdbapi(dbapi): def porttree_root(self): return self.settings.repositories.mainRepoLocation() + @property + def eclassdb(self): + main_repo = self.repositories.mainRepo() + if main_repo is None: + return None + return main_repo.eclass_db + def __init__(self, _unused_param=None, mysettings=None): """ @param _unused_param: deprecated, use mysettings['PORTDIR'] instead @@ -102,7 +109,6 @@ class portdbapi(dbapi): ":".join(filter(None, sandbox_write)) self.porttrees = list(self.settings.repositories.repoLocationList()) - self.eclassdb = self.repositories.mainRepo().eclass_db # This is used as sanity check for aux_get(). If there is no # root eclass dir, we assume that PORTDIR is invalid or |