コード例 #1
0
ファイル: shell.py プロジェクト: DarkHorseComics/giftwrap
def build(args):
    """ the entry point for all build subcommand tasks """
    builder = None
    fail = False
    try:
        manifest = None

        with open(args.manifest, 'r') as fh:
            manifest = fh.read()

        buildspec = BuildSpec(manifest, args.version, args.type)
        builder = giftwrap.builder.create_builder(buildspec)

        def _signal_handler(*args):
            LOG.info("Process interrrupted. Cleaning up.")
            builder.cleanup()
            sys.exit()
        signal.signal(signal.SIGINT, _signal_handler)

        builder.build()
    except Exception as e:
        LOG.exception("Oops something went wrong: %s", e)
        fail = True

    builder.cleanup()
    if fail:
        sys.exit(-1)
コード例 #2
0
ファイル: shell.py プロジェクト: longsube/giftwrap
def build(args):
    """ the entry point for all build subcommand tasks """
    builder = None
    fail = False
    try:
        manifest = None

        with open(args.manifest, 'r') as fh:
            manifest = fh.read()

        buildspec = BuildSpec(manifest, args.version, args.type)
        builder = giftwrap.builder.create_builder(buildspec)

        def _signal_handler(*args):
            LOG.info("Process interrrupted. Cleaning up.")
            builder.cleanup()
            sys.exit()

        signal.signal(signal.SIGINT, _signal_handler)

        builder.build()
    except Exception as e:
        LOG.exception("Oops something went wrong: %s", e)
        fail = True

    builder.cleanup()
    if fail:
        sys.exit(-1)
コード例 #3
0
ファイル: shell.py プロジェクト: DarkHorseComics/giftwrap
 def _signal_handler(*args):
     LOG.info("Process interrrupted. Cleaning up.")
     builder.cleanup()
     sys.exit()
コード例 #4
0
ファイル: shell.py プロジェクト: longsube/giftwrap
 def _signal_handler(*args):
     LOG.info("Process interrrupted. Cleaning up.")
     builder.cleanup()
     sys.exit()