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:
		@@ -230,7 +230,7 @@ def main():
 | 
				
			|||||||
    config = configparser.ConfigParser()
 | 
					    config = configparser.ConfigParser()
 | 
				
			||||||
    config.read(args.config)
 | 
					    config.read(args.config)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    channels = yaml.load(open(args.channels))
 | 
					    channels = yaml.safe_load(open(args.channels))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    a = SetAccess(channels, args.noop,
 | 
					    a = SetAccess(channels, args.noop,
 | 
				
			||||||
                  config.get('ircbot', 'nick'),
 | 
					                  config.get('ircbot', 'nick'),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user