pylint: Fix no-else-return lint error

Removed unnecessary else/elif after return.

BUG=b:158811392
TEST=make lint && make test && emerge-kukui factory

Change-Id: I313e9ce5dfa23c52d0878fee0d30bd9386c1c16d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/factory/+/2263674
Reviewed-by: Yilin Yang (kerker) <kerker@chromium.org>
Tested-by: Fei Shao <fshao@chromium.org>
Commit-Queue: Stimim Chen <stimim@chromium.org>
diff --git a/py/tools/ghost.py b/py/tools/ghost.py
index 986f02b..6d69e9f 100755
--- a/py/tools/ghost.py
+++ b/py/tools/ghost.py
@@ -403,7 +403,7 @@
       if ret:
         return [ret.group(1)]
       return []
-    elif self._platform == 'Linux':
+    if self._platform == 'Linux':
       with open('/proc/net/route', 'r') as f:
         lines = f.readlines()
 
@@ -420,9 +420,9 @@
           pass
 
       return ips
-    else:
-      logging.warning('GetGateWayIP: unsupported platform')
-      return []
+
+    logging.warning('GetGateWayIP: unsupported platform')
+    return []
 
   def GetFactoryServerIP(self):
     try:
@@ -451,7 +451,7 @@
     """
     if self._mid == Ghost.RANDOM_MID:
       return str(uuid.uuid4())
-    elif self._mid:
+    if self._mid:
       return self._mid
 
     # Darwin
@@ -496,7 +496,7 @@
   def GetProcessWorkingDirectory(self, pid):
     if self._platform == 'Linux':
       return os.readlink('/proc/%d/cwd' % pid)
-    elif self._platform == 'Darwin':
+    if self._platform == 'Darwin':
       PROC_PIDVNODEPATHINFO = 9
       proc_vnodepathinfo_size = 2352
       vid_path_offset = 152
@@ -508,8 +508,7 @@
       buf = buf.raw[vid_path_offset:]
       n = buf.index('\0')
       return buf[:n]
-    else:
-      raise RuntimeError('GetProcessWorkingDirectory: unsupported platform')
+    raise RuntimeError('GetProcessWorkingDirectory: unsupported platform')
 
   def Reset(self):
     """Reset state and clear request handlers."""