self.steps_duration[step] = self.steps_end[step] - self.steps_start[step]
def get_duration(self, step=None):
- if step == None:
+ if step is None:
duration = 0
for step in self.steps_duration.keys():
duration += self.steps_duration[step]
else:
colors = default_colors
-if args.type == "histogram" or args.type == None:
+if args.type == "histogram" or args.type is None:
if args.order == "build" or args.order == "duration" or args.order == "name":
pkg_histogram(d, args.output, args.order)
- elif args.order == None:
+ elif args.order is None:
pkg_histogram(d, args.output, "name")
else:
sys.stderr.write("Unknown ordering: %s\n" % args.order)
help="Limit the dependency graph to DEPTH levels")
args = parser.parse_args()
-if args.package == None:
+if args.package is None:
mode = FULL_MODE
else:
mode = PKG_MODE
rootpkg = args.package
-if args.depth != None:
+if args.depth is not None:
max_depth = int(args.depth)
allpkgs = []
if len(deps) != 0:
newdeps = get_all_depends(deps)
- if newdeps != None:
+ if newdeps is not None:
dependencies += newdeps
return dependencies
dependencies.append(('all', tg))
filtered_targets.append(tg)
deps = get_all_depends(filtered_targets)
- if deps != None:
+ if deps is not None:
dependencies += deps
rootpkg = 'all'