diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py
index 557b80baee18f44b6ff14f38be9212562ee128b1..f65d5b59a0d9a81c44f4d04683eb87e7773efa4a 100644
--- a/src/service/service/ServiceServiceServicerImpl.py
+++ b/src/service/service/ServiceServiceServicerImpl.py
@@ -279,7 +279,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
 
             # to get the reply form the optical module
             reply_txt = add_lightpath(src, dst, bitrate, bidir, ob_band)
-            
+
             # reply with 2 transponders and 2 roadms
             reply_json = json.loads(reply_txt)
             optical_band_txt = ""
@@ -300,7 +300,9 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
             else:
                 LOGGER.debug('Using existing optical band')
             if reply_txt is not None:
-                optical_reply = adapt_reply(devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt)
+                optical_reply = adapt_reply(
+                    devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt
+                )
                 LOGGER.info('optical_reply={:s}'.format(
                     grpc_message_to_json_string(optical_reply)))
 
diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py
index 5ed8aefdb43afdca1ebd1dcf6afe047d8027e65a..b9715aae637bb8845077bfc2b8b9b9d1bb030645 100644
--- a/src/service/service/task_scheduler/TaskExecutor.py
+++ b/src/service/service/task_scheduler/TaskExecutor.py
@@ -124,8 +124,8 @@ class TaskExecutor:
         myid.opticalconfig_uuid = device.device_id.device_uuid.uuid
         opticalconfig = OpticalConfig()
         setting = settings.value if settings else ""
-        new_config = {}
 
+        new_config = {}
         try:
             result = self._context_client.SelectOpticalConfig(myid)
             new_config = json.loads(result.config)