From 28d358fc82c228fdbfa9f1715a5024c49f98c9b4 Mon Sep 17 00:00:00 2001 From: Volodymyr Boiko <66446128+vboykox@users.noreply.github.com> Date: Mon, 1 Feb 2021 18:39:03 +0200 Subject: [PATCH] [show] Run fwutil with sudo (#1364) **- What I did** Added ability to run `show platform firmware` commands without `sudo`, as described in the [design document](https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md#platform-component-firmware-show-commands): **- How I did it** Made `show platform firmware` implementation run `fwutil` with `sudo` Signed-off-by: Volodymyr Boyko --- show/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/show/platform.py b/show/platform.py index 7a4f99d7ac76..b6f21df97928 100644 --- a/show/platform.py +++ b/show/platform.py @@ -133,7 +133,7 @@ def temperature(): @click.argument('args', nargs=-1, type=click.UNPROCESSED) def firmware(args): """Show firmware information""" - cmd = "fwutil show {}".format(" ".join(args)) + cmd = "sudo fwutil show {}".format(" ".join(args)) try: subprocess.check_call(cmd, shell=True)