]> git.sur5r.net Git - u-boot/commitdiff
tools: moveconfig: remove redundant else: after sys.exit()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 May 2016 06:51:51 +0000 (15:51 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 12 Jun 2016 22:46:28 +0000 (07:46 +0900)
Nesting by "else:" is not generally useful after such statements
as return, break, sys.exit(), etc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
tools/moveconfig.py

index 9029287b10ec0c48a67095bd0a34b8054f6b839c..1332bd283029c7534fcfc4a6d144846026d21afc 100755 (executable)
@@ -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)