factory: Fix no-else-return pylint error

BUG=chromium:999876
TEST=make lint

Change-Id: I824e504feabbc04a16e4891ba5d1bd8852fd5ebd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/factory/+/1991292
Commit-Queue: Yilin Yang (kerker) <kerker@chromium.org>
Tested-by: Yilin Yang (kerker) <kerker@chromium.org>
Auto-Submit: Yilin Yang (kerker) <kerker@chromium.org>
Reviewed-by: Yong Hong <yhong@chromium.org>
diff --git a/py/utils/pygpt.py b/py/utils/pygpt.py
index 84e948e..38d7679 100755
--- a/py/utils/pygpt.py
+++ b/py/utils/pygpt.py
@@ -1124,9 +1124,8 @@
       if args.primary_ignore:
         return ('Set %s primary GPT header to %s.' %
                 (args.image_file.name, gpt.header.SIGNATURE_IGNORE))
-      else:
-        return ('Changed GPT signature for %s to %s.' %
-                (args.image_file.name, new_signature))
+      return ('Changed GPT signature for %s to %s.' %
+              (args.image_file.name, new_signature))
 
   class Repair(SubCommand):
     """Repair damaged GPT headers and tables."""
@@ -1165,9 +1164,8 @@
             'from %s to %s .' %
             (args.number, args.image_file.name, old_blocks * gpt.block_size,
              new_blocks * gpt.block_size))
-      else:
-        return ('Nothing to expand for disk image %s partition %s.' %
-                (args.image_file.name, args.number))
+      return ('Nothing to expand for disk image %s partition %s.' %
+              (args.image_file.name, args.number))
 
   class Add(SubCommand):
     """Add, edit, or remove a partition entry.
@@ -1277,10 +1275,9 @@
       if part.IsUnused():
         # If we do ('%s' % part) there will be TypeError.
         return 'Deleted (zeroed) %s.' % (part,)
-      else:
-        return ('%s %s (%s+%s).' %
-                ('Added' if is_new_part else 'Modified',
-                 part, part.FirstLBA, part.blocks))
+      return ('%s %s (%s+%s).' %
+              ('Added' if is_new_part else 'Modified',
+               part, part.FirstLBA, part.blocks))
 
   class Show(SubCommand):
     """Show partition table and entries.
@@ -1359,8 +1356,7 @@
           return p.Attributes.legacy_boot
         elif args.Attribute:
           return '[%x]' % (p.Attributes.raw >> 48)
-        else:
-          return None
+        return None
 
       def IsFormatArgsSpecified():
         return any(getattr(args, arg[0]) for arg in GPTCommands.FORMAT_ARGS)