summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-28 14:40:57 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-28 14:40:57 +0000
commit962b3aa1fcc5614fb34f2184d11bc2877ff05997 (patch)
tree1664d645fe57f346119b01416cd774a0a4909573
parenta50c81b472bace52bc6d16cfc4a71bb1d2fdb73e (diff)
downloadportage-962b3aa1fcc5614fb34f2184d11bc2877ff05997.tar.gz
portage-962b3aa1fcc5614fb34f2184d11bc2877ff05997.tar.bz2
portage-962b3aa1fcc5614fb34f2184d11bc2877ff05997.zip
Make vartree.getslot() use the dbapi for aux_get caching.
svn path=/main/trunk/; revision=5406
-rw-r--r--pym/portage.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/pym/portage.py b/pym/portage.py
index f2b11876c..91121bbc8 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5305,14 +5305,10 @@ class vartree(object):
def getslot(self,mycatpkg):
"Get a slot for a catpkg; assume it exists."
- myslot = ""
try:
- myslot=string.join(grabfile(self.root+VDB_PATH+"/"+mycatpkg+"/SLOT"))
- except SystemExit, e:
- raise
- except Exception, e:
- pass
- return myslot
+ return self.dbapi.aux_get(mycatpkg, ["SLOT"])[0]
+ except KeyError:
+ return ""
def hasnode(self,mykey,use_cache):
"""Does the particular node (cat/pkg key) exist?"""