e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1,polyaxon/dockerizer/management/commands/build.py,Command,handle,#Command#,22

Before Change


            return

        // Building the docker image
        try:
            status = builder.build(build_job=build_job)
        except DockerException as e:
            builder.send_status(
                build_job=build_job,
                status=JobLifeCycle.FAILED,
                message="Failed to build job %s" % e)
            _logger.exception("Failed to build job %s", e)
            status = False
        except Exception as e:  // Other exceptions
            builder.send_status(
                build_job=build_job,
                status=JobLifeCycle.FAILED,
                message="Failed to build job %s" % e)
            _logger.exception("Failed to create build job %s", e)
            status = False

        if not status:
            builder.send_status(
                build_job=build_job,
                status=JobLifeCycle.FAILED,

After Change



        // Building the docker image
        error = {}
        try:
            status = builder.build(build_job=build_job)
            if not status:
                error = {
                    "raised": True,
                    "message": "Failed to build job."
                }
        except DockerException as e:
            error = {
                "raised": True,
                "traceback": traceback.format_exc(),
                "message": "Failed to build job encountered an {} exception".format(
                    e.__class__.__name__)
            }
        except Exception as e:  // Other exceptions
            error = {
                "raised": True,
                "traceback": traceback.format_exc(),
                "message": "Failed to build job encountered an {} exception".format(
                    e.__class__.__name__)
            }

        if error.get("raised"):
            builder.send_status(
                build_job=build_job,
                status=JobLifeCycle.FAILED,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/dockerizer/management/commands/build.py
Class Name: Command
Method Name: handle


Project Name: polyaxon/polyaxon
Commit Name: 91e7eb2a61473531cc5dcdd378c8bd5dc03a4554
Time: 2017-12-14
Author: mouradmourafiq@gmail.com
File Name: polyaxon_cli/cli/auth.py
Class Name:
Method Name: login


Project Name: pantsbuild/pants
Commit Name: b1545f2d4de791cefbe2cc1f8c102e053ba4c09b
Time: 2014-08-28
Author: zundel@squareup.com
File Name: src/python/pants/base/build_file_parser.py
Class Name: BuildFileParser
Method Name: parse_build_file