Skip to content

Commit 7fd9620

Browse files
authored
Merge pull request #27799 from benrimmington/monorepo-symlink-errors-follow-up
[update-checkout] Replace `17` with `errno.EEXIST`
2 parents 88de305 + 493f73e commit 7fd9620

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from __future__ import print_function
1212

1313
import argparse
14+
import errno
1415
import json
1516
import os
1617
import platform
@@ -416,7 +417,7 @@ def symlink_llvm_monorepo(args):
416417
try:
417418
os.symlink(src_path, dst_path)
418419
except OSError as e:
419-
if e.errno == 17:
420+
if e.errno == errno.EEXIST:
420421
print("File '%s' already exists. Remove it, so "
421422
"update-checkout can create the symlink to the "
422423
"llvm-monorepo." % dst_path)

0 commit comments

Comments
 (0)