archive mirror
 help / color / mirror / Atom feed
From: Paulo Neves <>
Cc: Paulo Neves <>
Subject: [PATCH 3/5] git: Remove is None check on  _find_git_lfs
Date: Fri, 17 Feb 2023 17:00:44 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

shutil.which returns None when the argument is not found.
As per documentation[1] None is evaluated to False and everything
else is True, so it is safe to have _find_git_lfs just return
the value of shutil.which


Signed-off-by: Paulo Neves <>
 lib/bb/fetch2/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/ b/lib/bb/fetch2/
index 2e3d32515..a3f29d2b9 100644
--- a/lib/bb/fetch2/
+++ b/lib/bb/fetch2/
@@ -687,7 +687,7 @@ class Git(FetchMethod):
         Return True if git-lfs can be found, False otherwise.
         import shutil
-        return shutil.which("git-lfs", path=d.getVar('PATH')) is not None
+        return shutil.which("git-lfs", path=d.getVar('PATH'))

     def _get_repo_url(self, ud):

  parent reply	other threads:[~2023-02-17 17:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 17:00 [PATCH 1/5] tests: git-lfs: Restore _find_git_lfs Paulo Neves
2023-02-17 17:00 ` [PATCH 2/5] test: Add real git lfs tests and decorator Paulo Neves
2023-02-17 17:00 ` Paulo Neves [this message]
2023-02-22 12:03   ` [bitbake-devel] [PATCH 3/5] git: Remove is None check on _find_git_lfs Richard Purdie
2023-02-17 17:01 ` [PATCH 4/5] @_contains_lfs: Removed unused variables Paulo Neves
2023-02-17 17:01 ` [PATCH 5/5] Replace mkdtemp with TemporaryDirectory and avoid exception masking Paulo Neves
2023-02-22 12:01 ` [bitbake-devel] [PATCH 1/5] tests: git-lfs: Restore _find_git_lfs Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).