diff options
author | AlanCoding <arominge@redhat.com> | 2020-03-11 09:53:06 -0400 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-21 20:00:46 +0800 |
commit | dbf3d2745c3758490f31199e31b098945ea81fca (patch) | |
tree | 6d4e724979446b86a25fd4ea90aae83e7bf6ddc7 /git | |
parent | 0420b01f24d404217210aeac0c730ec95eb7ee69 (diff) | |
download | gitpython-dbf3d2745c3758490f31199e31b098945ea81fca.tar.gz |
Do not error in race condition of directory existing
Diffstat (limited to 'git')
-rw-r--r-- | git/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/util.py b/git/util.py index d5939a6f..ef4db04c 100644 --- a/git/util.py +++ b/git/util.py @@ -174,7 +174,7 @@ def assure_directory_exists(path, is_file=False): path = osp.dirname(path) # END handle file if not osp.isdir(path): - os.makedirs(path) + os.makedirs(path, exist_ok=True) return True return False |