Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] post_sync actions
Date: Sun, 30 Oct 2005 03:46:14
Message-Id: 200510301246.44723.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] post_sync actions by Ned Ludd
1 On Sunday 30 October 2005 11:04, Ned Ludd wrote:
2 > updated patch that adds error checking and shifts when we exexve to the
3 > end patch
4
5 +                       try:
6 +                               portage.spawn(portage.USER_CONFIG_PATH + "/bin/post_sync " + dosyncuri, portage.settings, free=1)
7 +                       except:
8 +                               print red(" * ")+bold("spawn failed of "+ portage.USER_CONFIG_PATH + "/bin/post_sync")
9
10 Please don't _ever_ use try/except without specifying exactly what Exception
11 your looking to catch. You should be looking at the return value rather than
12 if an Exception was raised in this case anyway.
13
14 --
15 Jason Stubbs
16
17 --
18 gentoo-portage-dev@g.o mailing list