robustness.
This commit is contained in:
@@ -278,7 +278,11 @@ class CommandsLoader:
|
|||||||
obj = None
|
obj = None
|
||||||
for n, c in members:
|
for n, c in members:
|
||||||
if issubclass(c, Commands) and (n != "Commands"):
|
if issubclass(c, Commands) and (n != "Commands"):
|
||||||
obj = c(conf, self.log)
|
try:
|
||||||
|
obj = c(conf, self.log)
|
||||||
|
except:
|
||||||
|
self.log.error(f"The object '{c.__name__}' could not be instantiated.")
|
||||||
|
continue
|
||||||
obj.log = self.log
|
obj.log = self.log
|
||||||
obj.lock = self.lock
|
obj.lock = self.lock
|
||||||
obj.stop_all_event = self.stop_event
|
obj.stop_all_event = self.stop_event
|
||||||
|
|||||||
Reference in New Issue
Block a user