Skip to content

Commit 16660ab

Browse files
committed
address review
1 parent 8df2e49 commit 16660ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

misc/bazel/internal/install.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
assert destdir.is_absolute(), "Provide `--build-file` to resolve destination directory"
4444
script = runfiles.Rlocation(opts.pkg_install_script)
4545

46+
_WIN_FILE_IN_USE_ERROR_CODE = 32
47+
4648
if destdir.exists() and opts.cleanup:
4749
if platform.system() == 'Windows':
4850
# On Windows we might have virus scanner still looking at the path so
@@ -52,7 +54,7 @@
5254
shutil.rmtree(destdir)
5355
break
5456
except OSError as e:
55-
if e.winerror == 32:
57+
if e.winerror == _WIN_FILE_IN_USE_ERROR_CODE:
5658
time.sleep(retry_delay)
5759
else:
5860
raise

0 commit comments

Comments
 (0)