Commit e19f81b9 authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

service: skip devices without an optical configuration when deconfiguring too

The deconfigure paths tested only that SelectOpticalConfig returned a
result, not that it carried a configuration, so deleting a service that
crossed an emulated device raised "Expecting value: line 1 column 1"
and left the remaining devices on the path untouched. Mirrors the guard
already applied to the configure paths.

Relates to #316
parent c755a3d6
Loading
Loading
Loading
Loading
+2 −2
Changes for src/service/service/task_scheduler/TaskExecutor.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ class TaskExecutor:
            indexes["frequency"] = None
            indexes["band"] = None
            indexes["bidir"]=bidir
            if result is not None:
            if result is not None and result.config:
                new_config = json.loads(result.config)
                new_config["new_config"]=indexes
                new_config["flow"] = flows if len(flows)>0 else dev_flow
@@ -307,7 +307,7 @@ class TaskExecutor:
            # for extractor in device service to extract the index , dummy data for freq and band required
            indexes["frequency"] = None
            indexes["band"] = None
            if result is not None:
            if result is not None and result.config:
                new_config = json.loads(result.config)
                new_config["new_config"]=indexes
                new_config["flow"] = flows if len(flows)>0 else dev_flow