From 962b3aa1fcc5614fb34f2184d11bc2877ff05997 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 28 Dec 2006 14:40:57 +0000 Subject: [PATCH] Make vartree.getslot() use the dbapi for aux_get caching. svn path=/main/trunk/; revision=5406 --- pym/portage.py | 10 +++------- 1 file 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?""" -- 2.26.2