test/py: Tidy up pylint warnings in console_base
There are quite a few warnings which makes it confusing when editing this file. Resolve the easy ones, leaving: 125:0: R0902: Too many instance attributes (14/7) (too-many-instance-attributes) 212:4: R0912: Too many branches (14/12) (too-many-branches) 271:4: R0913: Too many arguments (6/5) (too-many-arguments) 271:4: R0912: Too many branches (13/12) (too-many-branches) 454:8: W0702: No exception type(s) specified (bare-except) 531:8: W0702: No exception type(s) specified (bare-except) Rename wait_for_boot_prompt() so it is clear that it is an internal function. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -180,11 +180,11 @@ class Spawn:
|
||||
|
||||
if os.WIFEXITED(status):
|
||||
self.exit_code = os.WEXITSTATUS(status)
|
||||
self.exit_info = 'status %d' % self.exit_code
|
||||
self.exit_info = f'status {self.exit_code}'
|
||||
elif os.WIFSIGNALED(status):
|
||||
signum = os.WTERMSIG(status)
|
||||
self.exit_code = -signum
|
||||
self.exit_info = 'signal %d (%s)' % (signum, signal.Signals(signum).name)
|
||||
self.exit_info = f'signal {signum} ({signal.Signals(signum).name})'
|
||||
self.waited = True
|
||||
return False, self.exit_code, self.exit_info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user