remove safe arg from ModuleManager.load_modules() - try_reload_modules covers this now

This commit is contained in:
jesopo 2019-10-14 13:02:16 +01:00
parent a9111c7241
commit e50290046a
2 changed files with 3 additions and 3 deletions

View file

@ -161,11 +161,11 @@ class Bot(object):
return (db_whitelist|conf_whitelist, db_blacklist|conf_blacklist) return (db_whitelist|conf_whitelist, db_blacklist|conf_blacklist)
def load_modules(self, safe: bool=False def load_modules(self
) -> typing.Tuple[typing.List[str], typing.List[str]]: ) -> typing.Tuple[typing.List[str], typing.List[str]]:
whitelist, blacklist = self._module_lists() whitelist, blacklist = self._module_lists()
return self.modules.load_modules(self, whitelist=whitelist, return self.modules.load_modules(self, whitelist=whitelist,
blacklist=blacklist, safe=safe) blacklist=blacklist)
def try_reload_modules(self) -> ModuleManager.TryReloadResult: def try_reload_modules(self) -> ModuleManager.TryReloadResult:
whitelist, blacklist = self._module_lists() whitelist, blacklist = self._module_lists()
return self.modules.try_reload_modules(self, whitelist=whitelist, return self.modules.try_reload_modules(self, whitelist=whitelist,

View file

@ -320,7 +320,7 @@ class ModuleManager(object):
return [definition_names[name] for name in definitions_ordered] return [definition_names[name] for name in definitions_ordered]
def load_modules(self, bot: "IRCBot.Bot", whitelist: typing.List[str]=[], def load_modules(self, bot: "IRCBot.Bot", whitelist: typing.List[str]=[],
blacklist: typing.List[str]=[], safe: bool=False blacklist: typing.List[str]=[]
) -> typing.Tuple[typing.List[str], typing.List[str]]: ) -> typing.Tuple[typing.List[str], typing.List[str]]:
loadable, nonloadable = self._list_valid_modules(bot, whitelist, blacklist) loadable, nonloadable = self._list_valid_modules(bot, whitelist, blacklist)