Fixed bug introduced by refactor. Sulley would indicate that a target failed to restart, even when it didn't.
Session.restart_target is used (by poll_pedrpc) as if it returns True or False. It actually returned None or False.
In master, sulley/sessions.py line 705 revision 54bdbbebdc2348a0c845d8425027f5557d05d515
if self.restart_target(target, stop_first=False) == False:
self.logger.critical("Restarting the target failed, exiting.")
...
In sulley_refactor, sulley/sessions.py line 673 revision 256c21d47624b67d44f28926ac905a5f8d58b93c
if not self.restart_target(target, stop_first=False):
self.logger.critical("Restarting the target failed, exiting.")
...
The problem is that restart_target never returned True if it succeeded. It returned None. This worked before, since None == False is False. But not None is True. I updated restart_target to return True if it succeeds.
Fixed bug introduced by refactor. Sulley would indicate that a target failed to restart, even when it didn't.
Session.restart_target
is used (bypoll_pedrpc
) as if it returns True or False. It actually returned None or False.In
master
,sulley/sessions.py
line 705 revision 54bdbbebdc2348a0c845d8425027f5557d05d515In
sulley_refactor
,sulley/sessions.py
line 673 revision 256c21d47624b67d44f28926ac905a5f8d58b93cThe problem is that restart_target never returned True if it succeeded. It returned None. This worked before, since
None == False
is False. Butnot None
is True. I updatedrestart_target
to return True if it succeeds.