Skip to content

Commit bf7004d

Browse files
committed
Handle stray value errors
1 parent e1fcad9 commit bf7004d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/manage/install_command.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ def _preserve_site(cmd, root):
495495
break
496496
except OSError:
497497
LOGGER.verbose("Failed to remove %s.", target)
498-
LOGGER.info("Preserving %s during update.", dirs[0].relative_to(root))
498+
try:
499+
LOGGER.info("Preserving %s during update.", dirs[0].relative_to(root))
500+
except ValueError:
501+
# Just in case a directory goes weird, so we don't break
502+
LOGGER.verbose(exc_info=True)
499503
LOGGER.verbose("Moving %s to %s", dirs[0], target)
500504
try:
501505
dirs[0].rename(target)

0 commit comments

Comments
 (0)