All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Franco <alejandro.franco@linux.intel.com>
To: yocto@yoctoproject.org
Subject: Re: [RFC] [autobuilder] Autobuilder.py: add verbose buildset parse error
Date: Tue, 23 Feb 2016 09:44:00 -0600	[thread overview]
Message-ID: <56CC7E40.3010906@linux.intel.com> (raw)
In-Reply-To: <1456242163-12255-1-git-send-email-alejandro.franco@linux.intel.com>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not sure this how this should be done, but at least it's been helpful in
my case

Alex Franco

On 02/23/2016 09:42 AM, Alex Franco wrote:
> From: Alejandro Franco <alejandro.franco@linux.intel.com>
>
> Add a more verbose Exception when a buildset parse operation fails
>
> Signed-off-by: Alejandro Franco <alejandro.franco@linux.intel.com>
> ---
>  lib/python2.7/site-packages/autobuilder/Autobuilder.py | 15
+++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/lib/python2.7/site-packages/autobuilder/Autobuilder.py
b/lib/python2.7/site-packages/autobuilder/Autobuilder.py
> index 3174784..f200974 100644
> --- a/lib/python2.7/site-packages/autobuilder/Autobuilder.py
> +++ b/lib/python2.7/site-packages/autobuilder/Autobuilder.py
> @@ -118,12 +118,15 @@ class Autobuilder:
>      def parseRepos(self, buildset=None):
>          buildset=buildset
>          if self.configdict[buildset].has_key('repos'):
> -            for layer in
ast.literal_eval(self.configdict[buildset]['repos']):
> -                if layer.iterkeys().next() not in self.repos:
> -                    schedpropstoextend, newcheckoutprops =
self.CreateLayerSchedulerParams(layer=layer, trigger=buildset,
triggerer=True)
> -                    self.schedprops.extend(schedpropstoextend)
> -                    self.checkoutprops.update(newcheckoutprops)
> -                    self.repos.append(layer.iterkeys().next())
> +            try:
> +                for layer in
ast.literal_eval(self.configdict[buildset]['repos']):
> +                    if layer.iterkeys().next() not in self.repos:
> +                        schedpropstoextend, newcheckoutprops =
self.CreateLayerSchedulerParams(layer=layer, trigger=buildset,
triggerer=True)
> +                        self.schedprops.extend(schedpropstoextend)
> +                        self.checkoutprops.update(newcheckoutprops)
> +                        self.repos.append(layer.iterkeys().next())
> +            except SyntaxError as err:
> +                raise ABConfigError("%s found in %s" % (err, buildset))
>          return
> 
>      def parseProps(self, buildset):

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJWzH5AAAoJEPR9uwMY2lTLg1MH/1WoSCFXJ768TR5yGvWM5vd1
2VdHTuMRD2FlvvblbFLIrOwsYd9TU5UccijLKYcu0K1k9CiQVjDRB4D7c/uzCLQv
E/ndOerRo1FkZyat2vEONfVInJTzycM2auY3j41jz1Pr4uyNhnJphgVzC/Kinf/F
PswyAYYnnV6ytTXFLBx4dSX5AIO0qXmoX9pmEP5W+FfmkjBQlqrbAScomyNSamhf
SGpC9520wUo7tke/2qLz5PgVkZ8LGR7ZlW6qEErZY462bW/cLWWpnP77c6ll3wiX
huC4iQtSTwJ0ZKl1NWHz0N9Fs8f9ky41VOxaD3EAjdroqMlKnfd8LkDfo6g2cm4=
=9eQK
-----END PGP SIGNATURE-----



  reply	other threads:[~2016-02-23 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 15:42 [RFC] [autobuilder] Autobuilder.py: add verbose buildset parse error Alex Franco
2016-02-23 15:44 ` Alex Franco [this message]
2016-02-23 17:20 ` Flanagan, Elizabeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CC7E40.3010906@linux.intel.com \
    --to=alejandro.franco@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.