slightly cleaner

This commit is contained in:
2021-02-08 13:13:46 +00:00
parent 3d576b116a
commit c31a953baf

View File

@ -42,9 +42,9 @@ class ModuleManager:
def _update_new(self):
for fn in self.fnames:
for fn in self.get_fnames():
if fn in self.modules:
print(f"{fn} already cached... skipping")
print(f"{fn} already cached... skipping load")
continue
mod = Module(fn)
@ -64,7 +64,8 @@ class ModuleManager:
for mod in self.modules.values():
if mod.is_running:
print(f"{mod.name} is running already")
else:
continue
print(f"{mod.name} starting")
try:
mod.start()
@ -72,8 +73,7 @@ class ModuleManager:
print(f"{mod.name} has no function to run")
@property
def fnames(self):
def get_fnames(self):
fns = self.folder.glob("*.py")
return sorted(fns)