File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1105,6 +1105,7 @@ def __resolve_chroot_symlink_as_needed(self, link_location: str) -> str:
11051105 return self .__resolve_chroot_symlink (link_location )
11061106
11071107 def __resolve_chroot_symlink (self , link_location : str ) -> str :
1108+ assert self .root_dir is not None
11081109 if os .path .commonprefix ([self .root_dir , link_location ]) != self .root_dir :
11091110 raise FileNotFoundError
11101111
@@ -1122,9 +1123,8 @@ def __resolve_chroot_symlink(self, link_location: str) -> str:
11221123 )
11231124 != os .path .realpath (self .root_dir )
11241125 ):
1125- raise FileNotFoundError (
1126- f"{ link_location } resolves outside of { self .root_dir } ."
1127- ) from None
1126+ # `link_location` resolves outside of `self.root_dir`.
1127+ raise FileNotFoundError from None
11281128
11291129 return link_location
11301130
You can’t perform that action at this time.
0 commit comments