Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def handler(patch, data):
info = self.patch_analysis(patch)
if "addlines" not in data:
data.update(info)
else:
for k, v in info.items():
data[k] += v
for info in bugs.values():
for rev, i in info["land"].items():
if not i["backedout"]:
queries.append(Query(url, {"node": rev}, handler, info))
if queries:
hgmozilla.Revision(queries=queries).wait()
torm = []
for bug, info in bugs.items():
landed_patches = [v["backedout"] for v in info["land"].values()].count(
False
)
# bug with only backouts
if landed_patches == 0:
torm.append(bug)
else:
info["landed_patches"] = landed_patches
# Remove bugs that we don't want to show
for bug in torm:
del bugs[bug]