Use ~x86 if absolutely no ACCEPT_KEYWORDS found.
authorRob Cakebread <pythonhead@gentoo.org>
Wed, 23 Jul 2008 22:40:36 +0000 (22:40 +0000)
committerRob Cakebread <pythonhead@gentoo.org>
Wed, 23 Jul 2008 22:40:36 +0000 (22:40 +0000)
git-svn-id: http://g-pypi.googlecode.com/svn/trunk@4 118783bc-b352-0410-bbc3-0f610f6f7ae8

g_pypi/portage_utils.py

index ee0e724e66fcf42563ff07ddfab6e195fd9ad755..c2f6a8872c6f4fe293d4c9732f3916d81a9878c9 100644 (file)
@@ -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