Skip to content

Commit

Permalink
runners: Reinstate ProcessRunner output in debug logs
Browse files Browse the repository at this point in the history
The log entry was being created before the runner output was captured, which
prevented said output from being written to the log.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
  • Loading branch information
tohojo committed Feb 19, 2017
1 parent 793f1b9 commit 26f96e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flent/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,6 @@ def run(self):
pid, sts = os.waitpid(self.pid, os.WNOHANG)

self.finish_event.set()
logger.debug("%s %s finished", self.__class__.__name__,
self.name, extra={'runner': self})

self.returncode = _handle_exitstatus(sts)

Expand Down Expand Up @@ -465,6 +463,9 @@ def run(self):
logger.warning("Command produced no valid data.",
extra={'runner': self})

logger.debug("%s %s finished", self.__class__.__name__,
self.name, extra={'runner': self})

def parse(self, output):
"""Default parser returns the last (whitespace-separated) word of
output as a float."""
Expand Down

0 comments on commit 26f96e1

Please sign in to comment.