"""Returns new min, max, and float value for those passed in"""
v = float(v)
- if mn == None or v < mn: mn = v
- if mx == None or v > mx: mx = v
+ if mn is None or v < mn: mn = v
+ if mx is None or v > mx: mx = v
return mn, mx, v
#--------------------------------------------------------------
elif o in ('-v', '--verbose'):
verbose = True
- if type == None and not generate_all:
+ if type is None and not generate_all:
fatal('Need type of data files to process - (-t <type>)')
return args
def gen_title(fig, type, title_str):
"""Sets the title for the figure based upon the type /or/ user title"""
- if title_str != None:
+ if title_str is not None:
pass
elif type == 'aqd':
title_str = 'Average Queue Depth'
#----------------------------------------------------------------------
global add_legend, output_file, title_str, verbose
- if output_file != None:
+ if output_file is not None:
ofile = output_file
else:
ofile = '%s.png' % type
if type == 'bnos':
ax.plot(dat['x'], dat['y'], color(idx, 'marker'),
markersize=1)
- elif dat['ax'] == None:
+ elif dat['ax'] is None:
continue # Don't add legend
else:
ax.plot(dat['ax'], dat['ay'], color(idx, 'line'),