From: Masahiro Yamada Date: Thu, 19 May 2016 06:51:51 +0000 (+0900) Subject: tools: moveconfig: remove redundant else: after sys.exit() X-Git-Tag: v2016.07-rc2~42^2~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ff8725bbe06b3b890beb2044c02ef332c8d028b4;p=oweals%2Fu-boot.git tools: moveconfig: remove redundant else: after sys.exit() Nesting by "else:" is not generally useful after such statements as return, break, sys.exit(), etc. Signed-off-by: Masahiro Yamada Reviewed-by: Joe Hershberger --- diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 9029287b10..1332bd2830 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -623,13 +623,11 @@ class Slot: COLOR_LIGHT_CYAN, errout) if self.options.exit_on_error: sys.exit("Exit on error.") - else: - # If --exit-on-error flag is not set, - # skip this board and continue. - # Record the failed board. - self.failed_boards.append(self.defconfig) - self.state = STATE_IDLE - return True + # If --exit-on-error flag is not set, skip this board and continue. + # Record the failed board. + self.failed_boards.append(self.defconfig) + self.state = STATE_IDLE + return True if self.state == STATE_AUTOCONF: self.parser.update_dotconfig(self.defconfig)