Skip to content

Commit 80a9827

Browse files
author
Vasileios Karakasis
committed
Code styling fine tuning
1 parent e300d5f commit 80a9827

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

reframe/core/schedulers/__init__.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,15 @@ def prepare(self, commands, environs=None, **gen_opts):
233233
'this backend') from e
234234

235235
if guessed_num_tasks < min_num_tasks:
236-
raise JobError(
237-
'could not find enough nodes: required %s, found %s' %
238-
(min_num_tasks // num_tasks_per_node,
239-
guessed_num_tasks // num_tasks_per_node))
240-
else:
241-
self._num_tasks = guessed_num_tasks
242-
getlogger().debug('flex_alloc_tasks: setting num_tasks '
243-
'to %s' % self._num_tasks)
236+
nodes_required = min_num_tasks // num_tasks_per_node
237+
nodes_found = guessed_num_tasks // num_tasks_per_node
238+
raise JobError('could not find enough nodes: '
239+
'required %s, found %s' %
240+
(nodes_required, nodes_found))
241+
242+
self._num_tasks = guessed_num_tasks
243+
getlogger().debug('flex_alloc_tasks: setting num_tasks to %s' %
244+
self._num_tasks)
244245

245246
with shell.generate_script(self.script_filename,
246247
**gen_opts) as builder:

0 commit comments

Comments
 (0)