Skip to content

Commit

Permalink
Fix debugging log message conversion
Browse files Browse the repository at this point in the history
* The Command.timeout can also be None in case is not set, converting it
  to string instead of integer for the debug messages.

Change-Id: Ib70a701ccea5ddd7df8f60bc23d94f336e584a3b
  • Loading branch information
volans- committed Jul 30, 2018
1 parent 6323e74 commit 305313e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cumin/transports/clustershell.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def start_command(self, schedule=False):

command = self.commands[self.current_command_index]
self.logger.debug(
"command='%s', timeout=%d, first_batch=%s", command.command, command.timeout, first_batch_set)
"command='%s', timeout=%s, first_batch=%s", command.command, command.timeout, first_batch_set)

# Schedule the command for execution in ClusterShell
Task.task_self().flush_buffers()
Expand Down Expand Up @@ -629,7 +629,7 @@ def ev_timer(self, timer): # noqa, mccabe: MC0001 too complex (15) FIXME
if node is not None:
# Schedule the execution with ClusterShell of the current command to the next node found above
command = self.nodes[node.name].commands[self.nodes[node.name].running_command_index + 1]
self.logger.debug("next_node=%s, timeout=%d, command='%s'", node.name, command.command, command.timeout)
self.logger.debug("next_node=%s, timeout=%s, command='%s'", node.name, command.command, command.timeout)
Task.task_self().shell(command.command, handler=timer.eh, timeout=command.timeout, nodes=nodeset(node.name))
return

Expand Down Expand Up @@ -774,7 +774,7 @@ def ev_timer(self, timer):
if node is not None:
# Schedule the exeuction of the first command to the next node with ClusterShell
command = node.commands[0]
self.logger.debug("next_node=%s, timeout=%d, command='%s'", node.name, command.command, command.timeout)
self.logger.debug("next_node=%s, timeout=%s, command='%s'", node.name, command.command, command.timeout)
Task.task_self().shell(
command.command, handler=timer.eh, timeout=command.timeout, nodes=nodeset(node.name))
else:
Expand Down

0 comments on commit 305313e

Please sign in to comment.