-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
machine: linux: Proper exception when retcode parsing fails
A long standing ugly error that tbot throws from time to time is one of the following nature: ValueError: invalid literal for int() with base 10: 'some random fragments of console output' Of course, this doesn't give any clue into what went wrong. This error is a result of unexpected output on the console while tbot is trying to read the return code integer for the last command that it executed. We can do better and raise a more descriptive exception for this case. This will at least give users some pointer into the direction of the problem. The exception now looks like this instead: tbot.error.InvalidRetcodeError: received string 'some random fragments of console output' instead of a return code integer Signed-off-by: Rahix <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
10 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
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