From: Zac Medico Date: Thu, 28 Dec 2006 14:40:57 +0000 (-0000) Subject: Make vartree.getslot() use the dbapi for aux_get caching. X-Git-Tag: v2.1.2~206 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=962b3aa1fcc5614fb34f2184d11bc2877ff05997;p=portage.git Make vartree.getslot() use the dbapi for aux_get caching. svn path=/main/trunk/; revision=5406 --- 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?"""