major refactor

This commit is contained in:
Vladimir Mandic
2023-09-04 11:31:29 -04:00
parent cb6731cec2
commit e9055c7cd8
23 changed files with 188 additions and 183 deletions
+3 -6
View File
@@ -244,12 +244,9 @@ def directory_has_changed(dir:str, *, recursive:bool=True) -> bool: # pylint: di
def directory_directories(dir:str, *, recursive:bool=True) -> dict[str,tuple[float,list[str]]]: # pylint: disable=redefined-builtin
dir = os.path.abspath(dir)
if directory_has_changed(dir, recursive=recursive):
for _dir in modelloader_directories:
try:
if (os.path.exists(_dir) and os.path.isdir(_dir)):
continue
except Exception:
pass
for _dir in list(modelloader_directories):
if os.path.exists(_dir) or os.path.isdir(_dir):
continue
del modelloader_directories[_dir]
for _dir, _files in walk(dir, lambda e, path: shared.log.debug(f"FS walk error: {e} {path}")):
try: