From 16c79cbe7e8310d6f3e517dd9d896620074fdf7a Mon Sep 17 00:00:00 2001 From: Rob Cakebread Date: Wed, 23 Jul 2008 22:40:36 +0000 Subject: [PATCH] Use ~x86 if absolutely no ACCEPT_KEYWORDS found. git-svn-id: http://g-pypi.googlecode.com/svn/trunk@4 118783bc-b352-0410-bbc3-0f610f6f7ae8 --- g_pypi/portage_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/g_pypi/portage_utils.py b/g_pypi/portage_utils.py index ee0e724..c2f6a88 100644 --- a/g_pypi/portage_utils.py +++ b/g_pypi/portage_utils.py @@ -191,8 +191,12 @@ def get_portdir(): def get_keyword(): """Return first ACCEPT_KEYWORDS from /etc/make.conf""" #Choose the first arch they have, in case of multiples. - - arch = ENV["ACCEPT_KEYWORDS"].split(' ')[0] + + try: + arch = ENV["ACCEPT_KEYWORDS"].split(' ')[0] + except KeyError: + self.logger.error("No ACCEPT_KEYWORDS found, using ~x86") + arch = '~x86' #New ebuilds must be ~arch -- 2.26.2