Skip to content

Commit

Permalink
make VIS files optional for modules i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Jul 11, 2024
1 parent d31367f commit 125dd71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Libraries/PyKotor/src/pykotor/common/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ def _handle_git_lyt_reloads(
errmsg: str,
) -> set[ResourceIdentifier]:
if not main_search_results.get(query):
if useable_type == VIS:
return set() # make vis optional I guess
raise FileNotFoundError(
errno.ENOENT,
os.strerror(errno.ENOENT),
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Utility/src/utility/system/os_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def terminate_main_process(
result2 = gracefully_shutdown_threads(timeout=timeout)
actual_self_pid = os.getpid()
if result1 and result2:
print("Call sys.exit NOW")
sys.exit(0)

RobustRootLogger().warning("Child processes and/or threads did not terminate, killing main process %s as a fallback.", actual_self_pid)
Expand All @@ -228,6 +229,7 @@ def terminate_main_process(
except Exception: # noqa: BLE001
RobustRootLogger().exception("Exception occurred while shutting down the main process")
finally:
print("call os.exit NOW")
os._exit(0 if result1 and result2 else 1)


Expand Down

0 comments on commit 125dd71

Please sign in to comment.