diff options
author | Paulo Neves <ptsneves@gmail.com> | 2022-09-20 13:45:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-21 12:22:13 +0100 |
commit | be1ee681e8a566564549068dcf90c95c36544815 (patch) | |
tree | bf8372d51a8b6cdf2f60eb6868b8efb5129d6dae | |
parent | 6424f4b7e9c1ba8db81346e8b3a806dd035d4551 (diff) | |
download | bitbake-be1ee681e8a566564549068dcf90c95c36544815.tar.gz |
fetch2: Remove unneeded conditional
The condition will always evaluate to true and
thus is redundant.
Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/git.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 4534bd758..17d490492 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -567,13 +567,12 @@ class Git(FetchMethod): source_found = False source_error = [] - if not source_found: - clonedir_is_up_to_date = not self.clonedir_need_update(ud, d) - if clonedir_is_up_to_date: - runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) - source_found = True - else: - source_error.append("clone directory not available or not up to date: " + ud.clonedir) + clonedir_is_up_to_date = not self.clonedir_need_update(ud, d) + if clonedir_is_up_to_date: + runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) + source_found = True + else: + source_error.append("clone directory not available or not up to date: " + ud.clonedir) if not source_found: if ud.shallow: |