Handle UnsupportedAPIException when running the ebuild(1)
authorZac Medico <zmedico@gentoo.org>
Thu, 4 Oct 2007 07:53:37 +0000 (07:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 4 Oct 2007 07:53:37 +0000 (07:53 -0000)
command.

svn path=/main/trunk/; revision=7918

bin/ebuild

index 355b349d96247393d1c35bdaa0094aebf3369161..d5e09dd976ac4b0531bdddac436564c087329c01 100755 (executable)
@@ -158,6 +158,7 @@ def stale_env_warning():
                        for x in msg:
                                portage.writemsg(">>> %s\n" % x)
 
+from portage.exception import UnsupportedAPIException
 checked_for_stale_env = False
 
 for arg in pargs:
@@ -178,6 +179,13 @@ for arg in pargs:
        except KeyError:
                # aux_get error
                a = 1
+       except UnsupportedAPIException, e:
+               from textwrap import wrap
+               msg = wrap(str(e), 70)
+               del e
+               for x in msg:
+                       portage.writemsg("!!! %s\n" % x, noiselevel=-1)
+               a = 1
        if a == None:
                print "Could not run the required binary?"
                a = 127