From: Masahiro Yamada Date: Thu, 19 May 2016 15:51:51 +0900 Subject: [U-Boot] [PATCH 03/21] tools: moveconfig: remove redundant else: after sys.exit() In-Reply-To: <1463640729-25666-1-git-send-email-yamada.masahiro@socionext.com> References: <1463640729-25666-1-git-send-email-yamada.masahiro@socionext.com> Message-ID: <1463640729-25666-4-git-send-email-yamada.masahiro@socionext.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Nesting by "else:" is not generally useful after such statements as return, break, and sys.exit(), etc. Signed-off-by: Masahiro Yamada --- tools/moveconfig.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 9029287..1332bd2 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) -- 1.9.1