Fix pylint warning: logging-not-lazy.
Use format string as first parameter of logging, and specify other
strings as argument, so we don't need to do the string format when
logging is not needed.
BUG=b:73868308
TEST=make test
Change-Id: I60df50d2a33b410736a8142efb1ea070ba621868
Reviewed-on: https://chromium-review.googlesource.com/937141
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 5b105f8..bf421a8 100755
--- a/py/tools/ghost.py
+++ b/py/tools/ghost.py
@@ -355,7 +355,7 @@
with open(self._prop_file, 'r') as f:
self._properties = json.loads(f.read())
except Exception as e:
- logging.error('LoadProperties: ' + str(e))
+ logging.error('LoadProperties: %s', e)
def CloseSockets(self):
# Close sockets opened by parent process, since we don't use it anymore.