From ea298f95f20ca3d59f6324221e8b9ab4a8ed656a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Jun 2017 00:00:02 +0530 Subject: [PATCH] Another place we can use exist_ok --- kitty/constants.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kitty/constants.py b/kitty/constants.py index 53f22e1af..52da3a393 100644 --- a/kitty/constants.py +++ b/kitty/constants.py @@ -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