From 90795c4fa478fca052e5cf67d199a58df63f726a Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 19 Nov 2018 15:55:13 -0800 Subject: [PATCH] build: make make_locale_dirs idempotent (#15768) --- build/mac/make_locale_dirs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/mac/make_locale_dirs.py b/build/mac/make_locale_dirs.py index 8559b4fdc460..a75d0735ad12 100644 --- a/build/mac/make_locale_dirs.py +++ b/build/mac/make_locale_dirs.py @@ -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__':