diff --git a/executorlib/interactive/executor.py b/executorlib/interactive/executor.py index 568982bc..1f532f79 100644 --- a/executorlib/interactive/executor.py +++ b/executorlib/interactive/executor.py @@ -29,8 +29,7 @@ from executorlib.standalone.thread import RaisingThread try: # The PyFluxExecutor requires flux-base to be installed. - from executorlib.interactive.flux import FluxPythonSpawner - from executorlib.interactive.flux import validate_max_workers + from executorlib.interactive.flux import FluxPythonSpawner, validate_max_workers except ImportError: pass diff --git a/executorlib/interactive/flux.py b/executorlib/interactive/flux.py index 04f25a5c..fd674087 100644 --- a/executorlib/interactive/flux.py +++ b/executorlib/interactive/flux.py @@ -12,7 +12,12 @@ def validate_max_workers(max_workers, cores, threads_per_core): cores_total = flux.resource.list.resource_list(handle).get().up.ncores cores_requested = max_workers * cores * threads_per_core if cores_total < cores_requested: - raise ValueError("The number of requested cores is larger than the available cores " + str(cores_total) + " < " + str(cores_requested)) + raise ValueError( + "The number of requested cores is larger than the available cores " + + str(cores_total) + + " < " + + str(cores_requested) + ) class FluxPythonSpawner(BaseSpawner):