[PATCH 1/2] Add a little debugging when pkg_exists fails

Mathieu Bridon bochecha at fedoraproject.org
Mon Nov 3 17:15:17 UTC 2014


On Mon, 2014-11-03 at 18:00 +0100, Pierre-Yves Chibon wrote:
> ---
>  scripts/process-git-requests/process-git-requests | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/process-git-requests/process-git-requests b/scripts/process-git-requests/process-git-requests
> index d12e419..6c41b4b 100755
> --- a/scripts/process-git-requests/process-git-requests
> +++ b/scripts/process-git-requests/process-git-requests
> @@ -147,7 +147,8 @@ def add_package(pkgdb, request, bug):
>      def pkg_exists(pkg):
>          try:
>              pkgdb.get_package(str(pkg))
> -        except PkgDBException:
> +        except PkgDBException, err:

Not necessary for this change, but you should try getting into the habit
of writing this like:

> +        except PkgDBException as err:

That will make it easier when we one day decide to port to Python 3. :)

The infra runs on Python >= 2.6, where this syntax is always available.


-- 
Mathieu



More information about the rel-eng mailing list