fix bug with unknown map types
This commit is contained in:
parent
f47bc9a6a6
commit
fa1456ae63
@ -53,22 +53,16 @@ def parse_dumps(input):
|
|||||||
|
|
||||||
fi = json.loads(text)
|
fi = json.loads(text)
|
||||||
|
|
||||||
try:
|
|
||||||
threshold_date = datetime.datetime.strptime(
|
|
||||||
directory_mapping[fi["data"]["Name"]]["threshold_date"],
|
|
||||||
"%Y-%m-%d"
|
|
||||||
)
|
|
||||||
except TypeError:
|
|
||||||
print(fi["data"]["Name"])
|
|
||||||
return None
|
|
||||||
|
|
||||||
datestr = fname.split(".getLocalloot_")[-1].split(".")[0]
|
datestr = fname.split(".getLocalloot_")[-1].split(".")[0]
|
||||||
date = datetime.datetime.strptime(datestr, "%Y-%m-%d_%H-%M-%S")
|
date = datetime.datetime.strptime(datestr, "%Y-%m-%d_%H-%M-%S")
|
||||||
|
|
||||||
if (
|
if (
|
||||||
fi["data"] is not None
|
fi["data"] is not None
|
||||||
and fi["data"]["Name"] not in blacklist
|
and fi["data"]["Name"] not in blacklist
|
||||||
and date > threshold_date
|
and date > datetime.datetime.strptime(
|
||||||
|
directory_mapping[fi["data"]["Name"]]["threshold_date"],
|
||||||
|
"%Y-%m-%d"
|
||||||
|
)
|
||||||
):
|
):
|
||||||
basic_info = {
|
basic_info = {
|
||||||
"map": fi["data"]["Name"],
|
"map": fi["data"]["Name"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user