]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/0023-Fix-arcstat.py-handling-of-unsupported-options.patch
bump version to 0.7.11-pve1~bpo1
[zfsonlinux.git] / zfs-patches / 0023-Fix-arcstat.py-handling-of-unsupported-options.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: LOLi <loli10K@users.noreply.github.com>
3 Date: Sat, 18 Aug 2018 22:10:36 +0200
4 Subject: [PATCH] Fix arcstat.py handling of unsupported options
5
6 This change allows the arcstat.py script to handle unsupported options
7 gracefully and print both error and usage messages when one such option
8 is provided.
9
10 Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
11 Reviewed-by: George Melikov <mail@gmelikov.ru>
12 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
14 Closes #7799
15
16 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
17 ---
18 cmd/arcstat/arcstat.py | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
22 index 85c83ccc..b52a8c29 100755
23 --- a/cmd/arcstat/arcstat.py
24 +++ b/cmd/arcstat/arcstat.py
25 @@ -285,7 +285,7 @@ def init():
26 ]
27 )
28 except getopt.error as msg:
29 - sys.stderr.write(msg)
30 + sys.stderr.write("Error: %s\n" % str(msg))
31 usage()
32 opts = None
33