Signed-off-by: Jan Tluka jtluka@redhat.com
# Conflicts: # lnst/Common/NetTestCommand.py
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Common/NetTestCommand.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py index b64186d..3f11f92 100644 --- a/lnst/Common/NetTestCommand.py +++ b/lnst/Common/NetTestCommand.py @@ -194,7 +194,10 @@ class NetTestCommand: def interrupt(self, cmd): self._finished = True if self.pid_exists(): - logging.debug("Interrupting background command with id "%s", pid "%d"" % (self._id, self._pid)) + if self._id: + logging.debug("Interrupting background command with id "%s", pid "%d"" % (self._id, self._pid)) + else: + logging.debug("Interrupting command with id "%s", pid "%d"" % (self._id, self._pid)) os.killpg(os.getpgid(self._pid), signal.SIGINT) self._control_cmd = cmd