X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=executors.py;h=b4cb06b4c9ad80816f0bb13e05e23863846fa8c1;hb=7ff2af6fe7bffea90dc4a31c93140c189917c659;hp=34528a33c2d10236cd7527fe53ffd027fa8020ca;hpb=6ba90a1f30f1c0cf4df12fcd0c62181f29bc3668;p=python_utils.git diff --git a/executors.py b/executors.py index 34528a3..b4cb06b 100644 --- a/executors.py +++ b/executors.py @@ -345,7 +345,7 @@ class RemoteExecutorStatus: self.in_flight_bundles_by_worker[worker].remove(uuid) if not was_cancelled: start = self.start_per_bundle[uuid] - assert start + assert start is not None bundle_latency = ts - start x = self.finished_bundle_timings_per_worker.get(worker, list()) x.append(bundle_latency) @@ -740,7 +740,7 @@ class RemoteExecutor(BaseExecutor): worker = None while worker is None: worker = self.find_available_worker_or_block(avoid_machine) - assert worker + assert worker is not None # Ok, found a worker. bundle.worker = worker @@ -840,7 +840,7 @@ class RemoteExecutor(BaseExecutor): self, p: Optional[subprocess.Popen], bundle: BundleDetails, depth: int ) -> Any: machine = bundle.machine - assert p + assert p is not None pid = p.pid if depth > 3: logger.error( @@ -984,7 +984,7 @@ class RemoteExecutor(BaseExecutor): # Tell the original to stop if we finished first. if not was_cancelled: orig_bundle = bundle.src_bundle - assert orig_bundle + assert orig_bundle is not None logger.debug( f'{bundle}: Notifying original {orig_bundle.uuid} we beat them to it.' )