mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-11 19:19:35 +02:00
Another place we can use exist_ok
This commit is contained in:
@@ -32,10 +32,7 @@ def _get_config_dir():
|
||||
|
||||
candidate = os.path.abspath(os.path.expanduser(os.environ.get('XDG_CONFIG_HOME') or ('~/Library/Preferences' if isosx else '~/.config')))
|
||||
ans = os.path.join(candidate, appname)
|
||||
try:
|
||||
os.makedirs(ans)
|
||||
except FileExistsError:
|
||||
pass
|
||||
os.makedirs(ans, exist_ok=True)
|
||||
return ans
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user