Fix some trivial pep8/pylint errors
Whitespace and an unused variable.
Signed-off-by: Brian Foley <bpfoley@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
diff --git a/lib/backend.py b/lib/backend.py
index f0ce380..51273f6 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -1104,6 +1104,7 @@
return result
+
def VerifyNodeNetTest(my_name, test_config):
"""Verify nodes are reachable.
@@ -1146,6 +1147,7 @@
" and ".join(fail))
return result
+
def VerifyMasterIP(my_name, test_config):
"""Verify master IP is reachable.
diff --git a/lib/cmdlib/cluster/verify.py b/lib/cmdlib/cluster/verify.py
index 0036f69..8785fbc 100644
--- a/lib/cmdlib/cluster/verify.py
+++ b/lib/cmdlib/cluster/verify.py
@@ -779,8 +779,8 @@
if constants.NV_MASTERIP not in nresult:
self._ErrorMsg(constants.CV_ENODENET, ninfo.name,
- "node hasn't returned node master IP reachability data")
- elif nresult[constants.NV_MASTERIP] == False: # be explicit, could be None
+ "node hasn't returned node master IP reachability data")
+ elif nresult[constants.NV_MASTERIP] == False: # be explicit, could be None
if ninfo.uuid == self.master_node:
msg = "the master node cannot reach the master IP (not configured?)"
else:
diff --git a/lib/http/server.py b/lib/http/server.py
index 8b3a4ee..9a4563e 100644
--- a/lib/http/server.py
+++ b/lib/http/server.py
@@ -423,7 +423,8 @@
try:
http.Handshake(sock, self.WRITE_TIMEOUT)
except http.HttpSessionHandshakeUnexpectedEOF:
- logging.debug("Unexpected EOF from %s:%s" % (client_addr[0], client_addr[1]))
+ logging.debug("Unexpected EOF from %s:%s",
+ client_addr[0], client_addr[1])
# Ignore rest
return
@@ -609,8 +610,9 @@
t_setup = time.time()
self.request_executor(self, self.handler, connection, client_addr)
t_end = time.time()
- logging.debug("Request from %s:%s executed in: %.4f [setup: %.4f] [workers: %d]" % (
- client_addr[0], client_addr[1], t_end - t_start, t_setup - t_start, len(self._children)))
+ logging.debug("Request from %s:%s executed in: %.4f [setup: %.4f] "
+ "[workers: %d]", client_addr[0], client_addr[1],
+ t_end - t_start, t_setup - t_start, len(self._children))
except Exception: # pylint: disable=W0703
logging.exception("Error while handling request from %s:%s",
diff --git a/lib/storage/bdev.py b/lib/storage/bdev.py
index 1f95004..7c1897c 100644
--- a/lib/storage/bdev.py
+++ b/lib/storage/bdev.py
@@ -510,7 +510,6 @@
logging.warning("lvs command returned an empty output, the LV cache will"
"be empty!")
return {}
- info = {}
return dict([LogicalVolume._ParseLvInfoLine(line, sep) for line in out])
def Attach(self, lv_info=None):