Fix format errors found by autopep8.
Most of them are whitespace error.
BUG=None
TEST=make test
Change-Id: I3850dbf1ecc567e8c4bf1d00aba94f844328cbc3
Reviewed-on: https://chromium-review.googlesource.com/1218307
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/tools/ghost.py b/py/tools/ghost.py
index bf421a8..2d8e9e7 100755
--- a/py/tools/ghost.py
+++ b/py/tools/ghost.py
@@ -181,7 +181,7 @@
LOGCAT: 'Logcat',
FILE: 'File',
FORWARD: 'Forward'
- }
+ }
RANDOM_MID = '##random_mid##'
@@ -690,7 +690,7 @@
except ValueError:
p.stdin.write(ret)
p.poll()
- if p.returncode != None:
+ if p.returncode is not None:
break
except Exception as e:
logging.error('SpawnShellServer: %s', e)
@@ -863,7 +863,7 @@
target_dir = os.getenv('HOME', '/tmp')
# Terminal session ID found, upload to it's current working directory
- if params.has_key('terminal_sid'):
+ if 'terminal_sid' in params:
pid = self._terminal_sid_to_pid.get(params['terminal_sid'], None)
if pid:
try:
@@ -1070,7 +1070,7 @@
Ghost.SHELL: self.SpawnShellServer,
Ghost.FILE: self.InitiateFileOperation,
Ghost.FORWARD: self.SpawnPortForwardServer,
- }[self._mode]
+ }[self._mode]
# Machine ID may change if MAC address is used (USB-ethernet dongle
# plugged/unplugged)