[OE-core] [PATCH] metadata_scm: Fix crash due to uncaught python exception

Merten Sach msach at mailbox.tu-berlin.de
Sun Nov 30 21:38:18 UTC 2014


Hi,

I submitted a patch about a week ago and haven't got any feedback.

This is my first patch submission to the openenmbedded project, so I'm eager to know if I missed out on anything.

Thanks
Merten

On 22/11/14 22:54, Merten Sach wrote:
> Function base_get_metadata_svn_revision was crashing due to an uncaught
> IndexError exception.
> 
> The except notation without parentheses is legacy syntax. It is the equivalent
> to 'except IOError as IndexError' which is not what we want here.
> 
> The change catches both exceptions.
> 
> Signed-off-by: Merten Sach <msach at mailbox.tu-berlin.de>
> ---
>  meta/classes/metadata_scm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
> index ba0edf9..237e618 100644
> --- a/meta/classes/metadata_scm.bbclass
> +++ b/meta/classes/metadata_scm.bbclass
> @@ -60,7 +60,7 @@ def base_get_metadata_svn_revision(path, d):
>      try:
>          with open("%s/.svn/entries" % path) as f:
>              revision = f.readlines()[3].strip()
> -    except IOError, IndexError:
> +    except (IOError, IndexError):
>          pass
>      return revision
>  
> 



More information about the Openembedded-core mailing list