aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcmd/arc_summary/arc_summary.py6
-rwxr-xr-xcmd/dbufstat/dbufstat.py6
2 files changed, 6 insertions, 6 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()
diff --git a/cmd/dbufstat/dbufstat.py b/cmd/dbufstat/dbufstat.py
index 0640b0f5b..0bda1524e 100755
--- a/cmd/dbufstat/dbufstat.py
+++ b/cmd/dbufstat/dbufstat.py
@@ -386,9 +386,9 @@ def update_dict(d, k, line, labels):
def print_dict(d):
print_header()
- for pool in d.keys():
- for objset in d[pool].keys():
- for v in d[pool][objset].values():
+ for pool in list(d.keys()):
+ for objset in list(d[pool].keys()):
+ for v in list(d[pool][objset].values()):
print_values(v)