Use yaml.safe_load() in accessbot

Newer versions of PyYAML have removed the ability to rely on
yaml.load() without passing an explicit Loader class. Instead,
switch to its safe_load() function which has an implicit one. The
same thing was done to our check_irc_access.py script in
I72776774eabd4e397ee5e8bdd58b3632be8fd3a1 but we never updated
accessbot similarly.

Change-Id: I32370e35c908acc3b75326a8ac5cadc25ef0760f
This commit is contained in:
Jeremy Stanley 2021-12-30 12:42:26 +00:00
parent c51521fffe
commit 38ec695e77

View File

@ -230,7 +230,7 @@ def main():
config = configparser.ConfigParser()
config.read(args.config)
channels = yaml.load(open(args.channels))
channels = yaml.safe_load(open(args.channels))
a = SetAccess(channels, args.noop,
config.get('ircbot', 'nick'),