fix null modes error
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5ca47ce551
commit
700a5955e7
|
@ -38,10 +38,12 @@ out["channels"] = []
|
||||||
for c in root.findall("./channellist/channel"):
|
for c in root.findall("./channellist/channel"):
|
||||||
name = unsanitize(c.find("channelname"))
|
name = unsanitize(c.find("channelname"))
|
||||||
|
|
||||||
|
modes = c.find("./channelmodes").text
|
||||||
if (
|
if (
|
||||||
# skip channels in the blacklist or with mode +s
|
# skip channels in the blacklist or with mode +s
|
||||||
"s" in c.find("./channelmodes").text.split()[0]
|
name in BLACKLIST
|
||||||
or name in BLACKLIST
|
or modes is None
|
||||||
|
or "s" in modes.split()[0]
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -54,7 +56,6 @@ for c in root.findall("./channellist/channel"):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
out["channels"].sort(key=lambda x: x["name"].lower())
|
out["channels"].sort(key=lambda x: x["name"].lower())
|
||||||
|
|
||||||
with open(f"{WORK_DIR}/stats.json", "w") as f:
|
with open(f"{WORK_DIR}/stats.json", "w") as f:
|
||||||
|
|
Loading…
Reference in New Issue