From 5608e26193249acf4d072f7658f88ea7e7222ae4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 17 Oct 2012 20:32:20 -0700 Subject: bintree/portree: fix getslot for EAPI 5 sub-slot --- pym/portage/dbapi/bintree.py | 6 ++---- pym/portage/dbapi/porttree.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'pym') diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index cbcfa728f..f90a4936f 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1484,9 +1484,7 @@ class binarytree(object): "Get a slot for a catpkg; assume it exists." myslot = "" try: - myslot = self.dbapi.aux_get(mycatpkg,["SLOT"])[0] - except SystemExit as e: - raise - except Exception as e: + myslot = self.dbapi._pkg_str(mycatpkg, None).slot + except KeyError: pass return myslot diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index a5945be59..115fc7f29 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -1063,10 +1063,8 @@ class portagetree(object): "Get a slot for a catpkg; assume it exists." myslot = "" try: - myslot = self.dbapi.aux_get(mycatpkg, ["SLOT"])[0] - except SystemExit: - raise - except Exception: + myslot = self.dbapi._pkg_str(mycatpkg, None).slot + except KeyError: pass return myslot -- cgit v1.2.3-1-g7c22