mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
DRYer
This commit is contained in:
parent
2263cd1355
commit
b581408137
1 changed files with 2 additions and 7 deletions
|
|
@ -72,14 +72,9 @@ else:
|
|||
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]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue