From 893dad656fdd822bf770c269294dc51dfe5e6d33 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Wed, 23 Sep 2020 13:36:43 +0000 Subject: op-mode: T2856: Fix broken pipe in show version all --- op-mode-definitions/version.xml | 2 +- src/op_mode/version.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/op-mode-definitions/version.xml b/op-mode-definitions/version.xml index 57931fdff..caf0dd6ea 100644 --- a/op-mode-definitions/version.xml +++ b/op-mode-definitions/version.xml @@ -18,7 +18,7 @@ Show system version and versions of all packages - sudo ${vyos_op_scripts_dir}/version.py --all + echo "Package versions:"; dpkg -l | awk '$0~/>/{exit}1' diff --git a/src/op_mode/version.py b/src/op_mode/version.py index a9916d246..49f55e1b4 100755 --- a/src/op_mode/version.py +++ b/src/op_mode/version.py @@ -33,7 +33,6 @@ import vyos.limericks parser = argparse.ArgumentParser() -parser.add_argument("-a", "--all", action="store_true", help="Include individual package versions") parser.add_argument("-f", "--funny", action="store_true", help="Add something funny to the output") parser.add_argument("-j", "--json", action="store_true", help="Produce JSON output") @@ -118,9 +117,5 @@ if __name__ == '__main__': output = pystache.render(version_output_tmpl, version_data).strip() print(output) - if args.all: - print("Package versions:") - os.system("dpkg -l") - if args.funny: print(vyos.limericks.get_random()) -- cgit v1.2.3