]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix flake8 "invalid escape sequence 'x'" warning
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 25 Oct 2018 06:26:08 +0000 (23:26 -0700)
committerTony Hutter <hutter2@llnl.gov>
Thu, 8 Nov 2018 22:38:28 +0000 (14:38 -0800)
From, https://lintlyci.github.io/Flake8Rules/rules/W605.html

As of Python 3.6, a backslash-character pair that is not a valid
escape sequence now generates a DeprecationWarning. Although this
will eventually become a SyntaxError, that will not be for several
Python releases.

Note 'float_pobj' was simply removed from arcstat.py since it
was entirely unused.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8056

cmd/arcstat/arcstat.py

index b52a8c29477cb84c0017f4815865e2c6271b0842..d7d3e9b731305227f0b08b1a0d8dca6a06f08bcd 100755 (executable)
@@ -112,7 +112,6 @@ cur = {}
 d = {}
 out = None
 kstat = None
-float_pobj = re.compile("^[0-9]+(\.[0-9]+)?$")
 
 
 def detailed_usage():