summaryrefslogtreecommitdiffstats
path: root/cmd/arc_summary
diff options
context:
space:
mode:
authorHajo Möller <[email protected]>2016-01-01 02:20:43 +0100
committerBrian Behlendorf <[email protected]>2016-01-07 17:09:59 -0800
commit7cf2ffa02065fe0cbec13bfb7bf4fcfaabb3d40a (patch)
tree7b7fc40cc4b3270e6f65ce2bff0d10b82c057984 /cmd/arc_summary
parent074348589b3de871a719173bef1ea4d01ffe66eb (diff)
Make arc_summary.py and dbufstat.py compatible with python3
To make arc_summary.py and dbufstat.py compatible with python3 some minor fixes were required, this was done automatically by `2to3 -w arc_summary.py` and `2to3 -w dbufstat.py`. Signed-off-by: Hajo Möller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Reviewed-by: Richard Laager <[email protected]>
Diffstat (limited to 'cmd/arc_summary')
-rwxr-xr-xcmd/arc_summary/arc_summary.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/arc_summary/arc_summary.py b/cmd/arc_summary/arc_summary.py
index 25238f39e..65b5c4dbd 100755
--- a/cmd/arc_summary/arc_summary.py
+++ b/cmd/arc_summary/arc_summary.py
@@ -94,7 +94,7 @@ def get_Kstat():
def div1():
sys.stdout.write("\n")
- for i in xrange(18):
+ for i in range(18):
sys.stdout.write("%s" % "----")
sys.stdout.write("\n")
@@ -1060,7 +1060,7 @@ def _tunable_summary(Kstat):
if alternate_tunable_layout:
format = "\t%s=%s\n"
- if show_tunable_descriptions and descriptions.has_key(name):
+ if show_tunable_descriptions and name in descriptions:
sys.stdout.write("\t# %s\n" % descriptions[name])
sys.stdout.write(format % (name, values[name]))
@@ -1132,7 +1132,7 @@ def main():
if 'p' in args:
try:
pages.append(unSub[int(args['p']) - 1])
- except IndexError , e:
+ except IndexError as e:
sys.stderr.write('the argument to -p must be between 1 and ' +
str(len(unSub)) + '\n')
sys.exit()