This commit is contained in:
Kovid Goyal 2024-06-01 13:37:05 +05:30
parent 67a9ee680b
commit 64340943bd
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -39,8 +39,11 @@ def setup_debug_print() -> bool:
fd = int(os.environ['KITTY_STDIO_FORWARDED'])
except Exception:
return False
sys.stdout = open(fd, 'w', closefd=False)
return True
try:
sys.stdout = open(fd, 'w', closefd=False)
return True
except OSError:
return False
return False