diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-28 15:35:39 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-28 15:35:39 +0000 |
commit | 83b30f85ffb8eb345cca706b27499b1dc59179f9 (patch) | |
tree | eb228aeb67bdbf3b230e867d0698751e8e1484ee | |
parent | 393ac699c54436e07ce023b9c631fffe5f5fb9fb (diff) | |
download | portage-83b30f85ffb8eb345cca706b27499b1dc59179f9.tar.gz portage-83b30f85ffb8eb345cca706b27499b1dc59179f9.tar.bz2 portage-83b30f85ffb8eb345cca706b27499b1dc59179f9.zip |
In action_regen(), use writemsg() to send error messages to
stderr.
svn path=/main/trunk/; revision=9066
-rw-r--r-- | pym/_emerge/__init__.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 9ac218321..2d34ed553 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5836,8 +5836,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 @@ -5847,11 +5847,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]: |