build: make make_locale_dirs idempotent (#15768)

This commit is contained in:
Jeremy Apthorp 2018-11-19 15:55:13 -08:00 committed by GitHub
parent 90d1c0b2b6
commit 90795c4fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,14 @@ import sys
def main(args):
for dirname in args:
os.makedirs(dirname)
try:
os.makedirs(dirname)
except OSError as e:
if e.errno == os.errno.EEXIST:
# It's OK if it already exists
pass
else:
raise
if __name__ == '__main__':