Quick fix of null pointer dereference
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 14 Dec 2017 17:26:50 +0000 (18:26 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 5 Jan 2018 14:25:35 +0000 (15:25 +0100)
Deleted a bit too much

Change-Id: Iea080f37a557c7c335821bddfdf4fda75fe28f48

manager/dryad_job_runner.go

index 9013711..a36df26 100644 (file)
@@ -131,7 +131,9 @@ func (d *dryadJobRunner) Test() error {
                                stdout, stderr, err := d.device.Exec(strings.Split(action.Name, " "), defaultDeviceExecTimeout)
                                d.log.Println("stdout:", string(stdout))
                                d.log.Println("stderr:", string(stderr))
-                               d.log.Println("error", err.Error())
+                               if err != nil {
+                                       d.log.Println("error", err.Error())
+                               }
                        case weles.Pull:
                                err := d.device.CopyFilesFrom([]string{action.Src}, action.Path)
                                if err != nil {