From: Zac Medico Date: Fri, 28 Dec 2007 16:46:15 +0000 (-0000) Subject: In action_regen(), use writemsg() to send error messages to X-Git-Tag: v2.1.4~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7845d0df2b3c61973f28daa58c5fd5f230f2de7;p=portage.git In action_regen(), use writemsg() to send error messages to stderr. (trunk r9066) svn path=/main/branches/2.1.2/; revision=9077 --- diff --git a/bin/emerge b/bin/emerge index 3febb47ff..f1ae377eb 100755 --- a/bin/emerge +++ b/bin/emerge @@ -5379,8 +5379,8 @@ def action_regen(settings, portdb): try: dead_nodes[mytree] = set(portdb.auxdb[mytree].iterkeys()) except CacheError, e: - print "Error listing cache entries for " + \ - "'%s': %s, continuing..." % (mytree, e) + portage.writemsg("Error listing cache entries for " + \ + "'%s': %s, continuing...\n" % (mytree, e), noiselevel=-1) del e dead_nodes = None break @@ -5390,11 +5390,10 @@ def action_regen(settings, portdb): for y in mymatches: try: foo = portdb.aux_get(y,["DEPEND"]) - except SystemExit, e: - # sys.exit is an exception... And consequently, we can't catch it. - raise - except Exception, e: - print "Error processing %(cpv)s, continuing... (%(e)s)" % {"cpv":y,"e":str(e)} + except (KeyError, portage_exception.PortageException), e: + portage.writemsg( + "Error processing %(cpv)s, continuing... (%(e)s)\n" % \ + {"cpv":y,"e":str(e)}, noiselevel=-1) if dead_nodes: for mytree in portdb.porttrees: if portdb.findname2(y, mytree=mytree)[0]: