From 568cce47f3dc9ffefdae59a2db9662218537e43e Mon Sep 17 00:00:00 2001 From: Samuel FORESTIER Date: Fri, 20 May 2022 23:44:31 +0200 Subject: [PATCH] Fixes black formatting --- src/distro/distro.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/distro/distro.py b/src/distro/distro.py index b76b6f1..847c29a 100755 --- a/src/distro/distro.py +++ b/src/distro/distro.py @@ -1110,15 +1110,12 @@ def __resolve_chroot_symlink_as_needed(self, link_location: str) -> str: try: resolved = os.readlink(link_location) except OSError: # includes case "not a symlink" - if ( - os.path.commonprefix( - [ - os.path.realpath(self.root_dir), - os.path.realpath(link_location), - ] - ) - != os.path.realpath(self.root_dir) - ): + if os.path.commonprefix( + [ + os.path.realpath(self.root_dir), + os.path.realpath(link_location), + ] + ) != os.path.realpath(self.root_dir): # `link_location` resolves outside of `self.root_dir`. raise FileNotFoundError from None