build: make make_locale_dirs idempotent (#15768)
This commit is contained in:
parent
90d1c0b2b6
commit
90795c4fa4
1 changed files with 8 additions and 1 deletions
|
@ -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__':
|
||||
|
|
Loading…
Reference in a new issue