summaryrefslogtreecommitdiff
path: root/cinder/privsep
diff options
context:
space:
mode:
authorSean McGinnis <sean.mcginnis@gmail.com>2019-12-19 10:46:37 -0600
committerSean McGinnis <sean.mcginnis@gmail.com>2020-01-09 14:35:20 -0600
commit1f7b0efdcca65d1940f0e982d481651de003710e (patch)
tree804a7e4f3fc6be3c35d6057ac82a26a383c8f336 /cinder/privsep
parent14e6385420df9eaac490c9efb5c6b3e2b6230d09 (diff)
downloadcinder-1f7b0efdcca65d1940f0e982d481651de003710e.tar.gz
Enable flake8-logging-format extension
The flake8-logging-format extension includes several checks for things we've had to try to catch in code reviews until now. This enables the extension and fixes the few cases where things had slipped through code review. G200: Logging statements should not include the exception in logged string is disabled since that triggers a lot more issues, some of which may be acceptable. That can be left as a follow up exercise if we want to clean those up and enable all checks. Change-Id: I1dedc0b31f78f518c2ab5dee5ed7abda1c1d9296 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Diffstat (limited to 'cinder/privsep')
-rw-r--r--cinder/privsep/hscli.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cinder/privsep/hscli.py b/cinder/privsep/hscli.py
index 4d7f85d66..fcbfd35be 100644
--- a/cinder/privsep/hscli.py
+++ b/cinder/privsep/hscli.py
@@ -37,9 +37,8 @@ def hsexecute(cmdarg_json):
(cmd_out, cmd_err) = putils.execute("hscli", cmdarg_json)
except (putils.UnknownArgumentError, putils.ProcessExecutionError,
OSError):
- LOG.error("Exception in running the command for %s",
- cmdarg_json,
- exc_info=True)
+ LOG.exception("Exception in running the command for %s",
+ cmdarg_json)
raise exception.UnableToExecuteHyperScaleCmd(command=cmdarg_json)
return (cmd_out, cmd_err)