forked from gluster/redant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signal handler is added for the graceful exit of the test framework. Fixes: gluster#208 Signed-off-by: Nishith Vihar Sakinala <[email protected]>
- Loading branch information
1 parent
e1e320f
commit 592dfae
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
This file consists of functions for handling | ||
signals. Signal handling is required for the | ||
graceful exit of the test framework | ||
""" | ||
|
||
def signal_handler(signalNumber, frame): | ||
""" | ||
Function for handling signal and raising the | ||
SystemExit call for graceful exit of the test | ||
framework | ||
Args: | ||
signalNumber (int): The signal number of the signal caught | ||
frame: current stack frame, None or stack frame object. | ||
""" | ||
print("Signal Received",signalNumber) | ||
raise SystemExit('Exiting...') | ||
return |