e15942dd6415dae2d97cfa583ab29f36f655e733,sos/sos_step.py,,execute_task,#Any#,69

Before Change


        // set current directory if specified
        orig_dir = os.getcwd()
        if "_runtime" in sos_dict and "workdir" in sos_dict["_runtime"]:
            os.chdir(os.path.expanduser(sos_dict["_runtime"]["workdir"]))
        // set environ ...
        if "_runtime" in sos_dict and "env" in sos_dict["_runtime"]:
            os.environ.update(sos_dict["_runtime"]["env"])

After Change


        // set current directory if specified
        orig_dir = os.getcwd()
        if "_runtime" in sos_dict and "workdir" in sos_dict["_runtime"]:
            if not os.path.isdir(os.path.expanduser(sos_dict["_runtime"]["workdir"])):
                try:
                    os.makedirs(os.path.expanduser(sos_dict["_runtime"]["workdir"]))
                except Exception as e:
                    raise RuntimeError("Failed to create workdir {}".format(sos_dict["_runtime"]["workdir"]))
            os.chdir(os.path.expanduser(sos_dict["_runtime"]["workdir"]))
        // set environ ...
        if "_runtime" in sos_dict and "env" in sos_dict["_runtime"]:
            os.environ.update(sos_dict["_runtime"]["env"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: vatlab/SoS
Commit Name: e15942dd6415dae2d97cfa583ab29f36f655e733
Time: 2016-12-29
Author: ben.bog@gmail.com
File Name: sos/sos_step.py
Class Name:
Method Name: execute_task


Project Name: vatlab/SoS
Commit Name: 20dc691c47f6dd04e1bfd3294736fd02063ee8f2
Time: 2016-12-10
Author: ben.bog@gmail.com
File Name: sos/jupyter/test/test_kernel.py
Class Name: TestKernel
Method Name: setUp


Project Name: vatlab/SoS
Commit Name: 9e36cd48e96f8323726e6808a689a426761b1237
Time: 2016-12-29
Author: ben.bog@gmail.com
File Name: sos/sos_step.py
Class Name:
Method Name: execute_task