diff --git a/kitty/child.py b/kitty/child.py index 8f1f59ede..0efcee7a0 100644 --- a/kitty/child.py +++ b/kitty/child.py @@ -72,14 +72,9 @@ def process_group_map() -> DefaultDict[int, List[int]]: return ans +@run_once def checked_terminfo_dir() -> Optional[str]: - q = getattr(checked_terminfo_dir, 'ans', False) - if q is False: - ans = terminfo_dir if os.path.isdir(terminfo_dir) else None - setattr(checked_terminfo_dir, 'ans', ans) - else: - ans = q - return ans + return terminfo_dir if os.path.isdir(terminfo_dir) else None def processes_in_group(grp: int) -> List[int]: