Dont use exist_ok in the bootstrap script as it might be run with python2 where it doesnt exist

This commit is contained in:
Kovid Goyal 2023-07-12 12:05:07 +05:30
parent 97b073fd8c
commit da8330253a
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -4,6 +4,7 @@
import base64
import contextlib
import errno
import io
import json
import os
@ -146,7 +147,11 @@ def compile_terminfo(base):
tname = '.terminfo'
q = os.path.join(base, tname, '78', 'xterm-kitty')
if not os.path.exists(q):
os.makedirs(os.path.dirname(q), exist_ok=True)
try:
os.makedirs(os.path.dirname(q))
except EnvironmentError as e:
if e.errno != errno.EEXIST:
raise
os.symlink('../x/xterm-kitty', q)
if os.path.exists('/usr/share/misc/terminfo.cdb'):
# NetBSD requires this