diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2025-02-07 13:46:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-11 21:18:39 +0000 |
commit | 3e543e8eaa18cecd9e360eecd3925b18e7a9058e (patch) | |
tree | eb145aea3fba915b26a850fef7d9c0410d4ab957 /bitbake/lib/bb/fetch2/az.py | |
parent | 2935d76bb468e576ab6219fa352968f2835f4ab8 (diff) | |
download | poky-3e543e8eaa18cecd9e360eecd3925b18e7a9058e.tar.gz |
bitbake: fetch2: remove unnecessary expand function calls
The fetch data class already expands the type, host, path, user, pswd
and parm variables. The fetcher classes already expand the localfile
variable. The getVar function expands the returned string per default.
Remove unnecessary expand function calls to simplify the code.
(Bitbake rev: 1b1eb037b861fbf20491ac17e519e9eaf232b858)
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/az.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/az.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/az.py b/bitbake/lib/bb/fetch2/az.py index 3ccc594c22..346124a8bf 100644 --- a/bitbake/lib/bb/fetch2/az.py +++ b/bitbake/lib/bb/fetch2/az.py | |||
@@ -66,11 +66,12 @@ class Az(Wget): | |||
66 | else: | 66 | else: |
67 | azuri = '%s%s%s' % ('https://', ud.host, ud.path) | 67 | azuri = '%s%s%s' % ('https://', ud.host, ud.path) |
68 | 68 | ||
69 | dldir = d.getVar("DL_DIR") | ||
69 | if os.path.exists(ud.localpath): | 70 | if os.path.exists(ud.localpath): |
70 | # file exists, but we didnt complete it.. trying again. | 71 | # file exists, but we didnt complete it.. trying again. |
71 | fetchcmd += d.expand(" -c -P ${DL_DIR} '%s'" % azuri) | 72 | fetchcmd += " -c -P %s '%s'" % (dldir, azuri) |
72 | else: | 73 | else: |
73 | fetchcmd += d.expand(" -P ${DL_DIR} '%s'" % azuri) | 74 | fetchcmd += " -P %s '%s'" % (dldir, azuri) |
74 | 75 | ||
75 | try: | 76 | try: |
76 | self._runwget(ud, d, fetchcmd, False) | 77 | self._runwget(ud, d, fetchcmd, False) |