only readlink on links (#23948)

This commit is contained in:
Greg Becker 2021-05-27 09:20:57 -07:00 committed by GitHub
parent 2b78b04dc5
commit b9a66966a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -500,7 +500,7 @@ def from_dict(base_path, d):
@property
def _current_root(self):
if not os.path.exists(self.root):
if not os.path.islink(self.root):
return None
root = os.readlink(self.root)