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_rev(json, data):
push = json["pushdate"][0]
push = datetime.datetime.utcfromtimestamp(push)
push = lmdutils.as_utc(push)
data["date"] = lmdutils.get_date_str(push)
data["backedout"] = utils.is_backout(json)
m = BUG_PAT.search(json["desc"])
if not m or m.group(1) != data["bugid"]:
data["bugid"] = ""
def get_extra_for_template(self):
return {
"nightly": self.nightly,
"beta": self.beta,
"release": self.release,
"date": lmdutils.get_date_str(self.date),
}
def get_info_from_hg(json):
res = {}
push = json["pushdate"][0]
push = datetime.datetime.utcfromtimestamp(push)
push = lmdutils.as_utc(push)
res["date"] = lmdutils.get_date_str(push)
res["backedout"] = json.get("backedoutby", "") != ""
m = BUG_PAT.search(json["desc"])
res["bugid"] = m.group(1) if m else ""
return res