On 03/01/2012 11:01 PM, tom.zanu...@intel.com wrote: > From: Tom Zanussi <tom.zanu...@intel.com> > > Implementation of the 'yocto-bsp' command-line tool, for creating BSPs > and listing BSP properties. > > Signed-off-by: Tom Zanussi <tom.zanu...@intel.com> > --- > scripts/yocto-bsp | 131 > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 131 insertions(+), 0 deletions(-) > create mode 100755 scripts/yocto-bsp > > diff --git a/scripts/yocto-bsp b/scripts/yocto-bsp > new file mode 100755 > index 0000000..20fa89d > --- /dev/null > +++ b/scripts/yocto-bsp > @@ -0,0 +1,131 @@ > +#!/usr/bin/env python > +# ex:ts=4:sw=4:sts=4:et > +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- > +# > +# Copyright 2012 Intel Corporation > +# Authored-by: Tom Zanussi <tom.zanu...@intel.com> > +#
same comment... ... > +def yocto_bsp_list_subcommand(args, usage_str): > + """ > + Command-line handling for listing available BSP properties and > + values. The real work is done by bsp.engine.yocto_bsp_list() > + """ > + parser = optparse.OptionParser(usage = usage_str) > + > + parser.add_option("-o", "--outfile", action = "store", dest = > "properties_file", > + help = "dump the possible values for BSP properties to > a JSON file") > + > + (options, args) = parser.parse_args(args) > + > + if not yocto_bsp_list(args, scripts_path, options.properties_file): > + logging.error("Bad list arguments, exiting\n") > + parser.print_help() > + exit(1) I see sys.exit() below and just exit() here, and above you "import sys", so I believe this should also be sys.exit() ... > +if __name__ == "__main__": > + try: > + ret = main() > + except Exception: > + ret = 1 > + import traceback > + traceback.print_exc(5) > + sys.exit(ret) > + -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto