diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 11:49:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:00 +0100 |
commit | 8587bce564f715e46e7317218b5c190813d3a939 (patch) | |
tree | d67f45ca7d88f1ea1dcfc436a82763fa6c39a686 /meta/lib/oe/recipeutils.py | |
parent | a7309d5790f5dac46e84d3c14959943eb2496fda (diff) | |
download | poky-8587bce564f715e46e7317218b5c190813d3a939.tar.gz |
classes/lib: Update to match python3 iter requirements
python3 standardises its use of iteration operations. Update
the code to match the for python3 requires.
(From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 3e17873fd8..b437720fe7 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -336,7 +336,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath=''): | |||
336 | varfiles = get_var_files(fn, varlist, d) | 336 | varfiles = get_var_files(fn, varlist, d) |
337 | locs = localise_file_vars(fn, varfiles, varlist) | 337 | locs = localise_file_vars(fn, varfiles, varlist) |
338 | patches = [] | 338 | patches = [] |
339 | for f,v in locs.iteritems(): | 339 | for f,v in locs.items(): |
340 | vals = {k: varvalues[k] for k in v} | 340 | vals = {k: varvalues[k] for k in v} |
341 | patchdata = patch_recipe_file(f, vals, patch, relpath) | 341 | patchdata = patch_recipe_file(f, vals, patch, relpath) |
342 | if patch: | 342 | if patch: |
@@ -554,7 +554,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
554 | bbappendlines = [] | 554 | bbappendlines = [] |
555 | if extralines: | 555 | if extralines: |
556 | if isinstance(extralines, dict): | 556 | if isinstance(extralines, dict): |
557 | for name, value in extralines.iteritems(): | 557 | for name, value in extralines.items(): |
558 | bbappendlines.append((name, '=', value)) | 558 | bbappendlines.append((name, '=', value)) |
559 | else: | 559 | else: |
560 | # Do our best to split it | 560 | # Do our best to split it |
@@ -594,7 +594,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
594 | copyfiles = {} | 594 | copyfiles = {} |
595 | if srcfiles: | 595 | if srcfiles: |
596 | instfunclines = [] | 596 | instfunclines = [] |
597 | for newfile, origsrcfile in srcfiles.iteritems(): | 597 | for newfile, origsrcfile in srcfiles.items(): |
598 | srcfile = origsrcfile | 598 | srcfile = origsrcfile |
599 | srcurientry = None | 599 | srcurientry = None |
600 | if not srcfile: | 600 | if not srcfile: |
@@ -717,7 +717,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
717 | if copyfiles: | 717 | if copyfiles: |
718 | if machine: | 718 | if machine: |
719 | destsubdir = os.path.join(destsubdir, machine) | 719 | destsubdir = os.path.join(destsubdir, machine) |
720 | for newfile, srcfile in copyfiles.iteritems(): | 720 | for newfile, srcfile in copyfiles.items(): |
721 | filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile)) | 721 | filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile)) |
722 | if os.path.abspath(newfile) != os.path.abspath(filedest): | 722 | if os.path.abspath(newfile) != os.path.abspath(filedest): |
723 | bb.note('Copying %s to %s' % (newfile, filedest)) | 723 | bb.note('Copying %s to %s' % (newfile, filedest)) |