Log shutil.rmtree.avoids_symlink_attacks as a warning, not an error

This commit is contained in:
Eric Torres 2019-05-01 12:07:33 -07:00
parent 54165bc477
commit e1416a02aa
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ class Hierarchy(os.PathLike):
# We don't want to risk symlink attacks # We don't want to risk symlink attacks
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
if not shutil.rmtree.avoids_symlink_attacks: if not shutil.rmtree.avoids_symlink_attacks:
syslog.error( syslog.warning(
"shutil cannot avoid symlink attacks on this platform. Ignoring." "shutil cannot avoid symlink attacks on this platform. Ignoring."
) )
return return

View File

@ -222,7 +222,7 @@ class Repository(Hierarchy):
# We don't want to risk symlink attacks # We don't want to risk symlink attacks
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
if not shutil.rmtree.avoids_symlink_attacks: if not shutil.rmtree.avoids_symlink_attacks:
syslog.error( syslog.warning(
"shutil cannot avoid symlink attacks on this platform. Ignoring." "shutil cannot avoid symlink attacks on this platform. Ignoring."
) )
return return