Skip to content

Commit

Permalink
scripts: remove all unnecessary parens after 'if' keyword
Browse files Browse the repository at this point in the history
Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
  • Loading branch information
wdauchy authored and Pekka Enberg committed Sep 17, 2014
1 parent f2902f1 commit 092edab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/benchs/zfs_mount.py
Expand Up @@ -50,7 +50,7 @@ def run_zfsmount_bench(total_samples):
print "%d\t%.1f\t%.1f\t%.1f\t%.1f\t%.1f" % (sample, mount_time, stats_min, stats_max, stats_avg, stats_stdev)
osv.wait()

if (__name__ == "__main__"):
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog='zfs_mount')
parser.add_argument("-s", "--samples", action="store", default="5",
help="specify number of samples")
Expand Down
4 changes: 2 additions & 2 deletions scripts/loader.py
Expand Up @@ -206,7 +206,7 @@ def free_page_ranges_tree(node):
break

def vma_list(node = None):
if (node == None):
if node == None:
fpr = gdb.lookup_global_symbol('mmu::vma_list').value()
p = fpr['tree_']['data_']['node_plus_pred_']
node = p['header_plus_size_']['header_']['parent_']
Expand Down Expand Up @@ -1378,7 +1378,7 @@ def invoke(self, arg, from_tty):
ptep = pte + pt_index(addr, level) * 8

def runqueue(cpuid, node = None):
if (node == None):
if node == None:
cpus = gdb.lookup_global_symbol('sched::cpus').value()
cpu = cpus['_M_impl']['_M_start'][cpuid]
rq = cpu['runqueue']
Expand Down
6 changes: 3 additions & 3 deletions scripts/post-processing/scheduler/trace_sched_timings.py
Expand Up @@ -15,10 +15,10 @@
sec = int(sec)
microsec = int(microsec)

if (event == "sched_switch"):
if event == "sched_switch":
fromm = threadp
if (sched.has_key(fromm)):
if (not threads.has_key(fromm)):
if sched.has_key(fromm):
if not threads.has_key(fromm):
threads[fromm] = []

threads[fromm] += [(sec - sched[fromm][0], microsec - sched[fromm][1])]
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.py
Expand Up @@ -101,7 +101,7 @@ def main():
if not cmdargs.repeat:
break

if (__name__ == "__main__"):
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog='test')
parser.add_argument("-v", "--verbose", action="store_true", help="verbose test output")
parser.add_argument("-r", "--repeat", action="store_true", help="repeat until test fails")
Expand Down

0 comments on commit 092edab

Please sign in to comment.