summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* devtool: reset: allow specifying multiple recipesPaul Eggleton2016-06-151-4/+5
| | | | | | | | | | | Allow specifying more than one recipe on the devtool reset command line. Also tweak the help text slightly. (From OE-Core rev: ad92ed8e4f7f48a3d212962531d596b36f6b284f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Added missing parentheses to string formattingHumberto Ibarra2016-06-121-1/+1
| | | | | | | | | | | | | | Commit ab75075e7941c8c2ec429c180976702cd311c978 broke the string formatting for multiple arguments. Since parentheses were removed the formatting considers only first argument instead of all of them. Fixed parentheses on the formatting. [YOCTO #9723] (From meta-yocto rev: d6d641d5b4bb0c8b9acd5cd1341a4a3214bff086) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/kernel.py: python3: use explicit relative importsHumberto Ibarra2016-06-121-1/+1
| | | | | | | | | | | | | Have to convert implicit relative imports to explicit imports since implicit relative imports are not supported on python3. [YOCTO #9723] (From meta-yocto rev: 89cecc603d229768428f3cb68d21235dee80efda) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Rename raw_input commands to inputHumberto Ibarra2016-06-121-2/+2
| | | | | | | | | | | | | | According to https://docs.python.org/3/whatsnew/3.0.html python3 renamed 'raw_input' to 'input'. Making the appropiate changes for this. [YOCTO #9723] (From meta-yocto rev: 76efeeeac7fb30b44ee7057b3b3d1fd84329dae1) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine.py: Added missing keyword to fix syntax errorHumberto Ibarra2016-06-071-1/+1
| | | | | | | | | | | | Commit af9f6b88fcc5d7fddff01595f9bcf2aba548720 introduced a syntax error in engine.py by removing keyword "in". This patch adds it back. [Yocto #9719] (From meta-yocto rev: 49f02f3344617f8b077edf61e8f5ead05e8405eb) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: decode subprocess outputEd Bartosh2016-06-031-5/+5
| | | | | | | | | | | stdeout and stderr content returned by subprocess API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. (From meta-yocto rev: 1de9d0b4ad289c56907d082748cdc0111988cb4f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* engine: python3: replace iteritems() -> items()Ed Bartosh2016-06-031-3/+3
| | | | | | | | | Used items() as iteritems() doesn't exist in python 3. (From meta-yocto rev: 0fd2e739cd14c6a02b6f4610176a0ad29b2ecc0e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: replace exec statement with builtinEd Bartosh2016-06-031-1/+1
| | | | | | | | | | Used exec() builtin instead of 'exec' statement as this statement doesn't exist in python 3. (From meta-yocto rev: ceb6c6fac212c5e1e76bf58b793dc2b9420b4a66) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: use explicit relative importsEd Bartosh2016-06-032-3/+2
| | | | | | | | | | | | Implicit relative imports within packages are not supported in python 3. They have to be converted to explicit imports. Used 'from .module import' syntax for relative imports. (From meta-yocto rev: 8eb2befc544e29fd87ac1fc75886cc6d7f40ad90) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* engine.py: python3: rename sys.maxint to sys.maxsizeEd Bartosh2016-06-031-3/+3
| | | | | | | | | | Renamed sys.maxint -> sys.maxsize as sys.maxint doesn't exist in python 3. (From meta-yocto rev: b165be8c7f6d44c03bc76dd25c2b9e4cb54bb65a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: use new metaclass syntaxEd Bartosh2016-06-031-4/+2
| | | | | | | | | | | Used metaclass=<metaclass> syntax instead old __metaclass__ = <metaclass> as only new one is supported in python 3. (From meta-yocto rev: 70ba79981d904b4b67440c0b5755b5449cddb025) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: rename raw_input to inputEd Bartosh2016-06-032-12/+12
| | | | | | | | | | Renamed raw_input to input as raw_input does not exist in python 3. (From meta-yocto rev: c9df9f2699885f2ba5b031c8761aefbf3c796067) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live, image-vm, wic: Remove fs size workaroundJussi Kukkonen2016-06-034-26/+0
| | | | | | | | | | | | Since mtools has been patched to live with filesystems with sizes not divisible by sectors-per-track, we no longer need to try to set the size based on our guess of the sectors-per-track dosfstools is going to use. (From OE-Core rev: 334e32af88b310ff1ed950d127a6dedeb460f8d0) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: change python to python3 in shebangEd Bartosh2016-06-031-1/+1
| | | | | | | (From OE-Core rev: 4b544ff388497cac82b0585f237900595523e1cb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: convert iterables to listsEd Bartosh2016-06-034-7/+7
| | | | | | | | | | | Converted return value of items() keys() and values() to lists when dictionary is modified in the loop and when the result is added to the list. (From OE-Core rev: 874a269eb1d70060c2f3b3f8b70800e2aea789f4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix urlparse imports for python3Ed Bartosh2016-06-021-3/+3
| | | | | | | | | | Used urllib.parse instead of urlparse to make code working in python 3. (From OE-Core rev: 0a064f2216895db0181ee033a785328e704ddc0b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix encoding errors for python3Ed Bartosh2016-06-024-5/+6
| | | | | | | | | | | | | | Moved call of decode('utf-8') as close as possible to call of subprocess API to avoid calling it in a lot of other places. Decoded binary data to utf-8 where appropriate to fix devtool and recipetool tests in python 3 environment. (From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Replace basestring -> str for python3Ed Bartosh2016-06-024-6/+6
| | | | | | | | | | Python 3 doesn't have basestring type as all string are unicode strings. (From OE-Core rev: e8cfab060f4ff3c4c16387871354d407910e87aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Fix deprecated dict methods for python3Ed Bartosh2016-06-028-35/+35
| | | | | | | | | | Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' (From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: encode help textEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | Encoded help text before sending it to pager.communicate as it expects binary. [YOCTO #9412] (From OE-Core rev: 23c27d9d936efaa17da00525f1d2e2f98c53abc7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update xrange -> range for python3Richard Purdie2016-06-021-2/+2
| | | | | | | | xrange() no longer exists in python 3, use range() (From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to explictly create lists where neededRichard Purdie2016-06-021-6/+6
| | | | | | | | | Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. (From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to match python3 iter requirementsRichard Purdie2016-06-021-1/+1
| | | | | | | | | 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>
* scripts: python3: Use print functionEd Bartosh2016-06-012-86/+85
| | | | | | | | | | Used print function instead of print statement to make the code work in python 3. (From meta-yocto rev: d6eea5a794dd8802b773a9186479a863847e6e55) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool / devtool: set a fixed SRCREV by default when fetching from gitPaul Eggleton2016-06-012-0/+8
| | | | | | | | | | | If fetching source from a git repository, typically within OpenEmbedded we encourage setting SRCREV to a fixed revision, so change to do that by default and add a -a/--autorev option to use "${AUTOREV}" instead. (From OE-Core rev: 000480c42797dd2f03ebc3bc6d1dabfc6a7b75f5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: use ${BP} for subdir for binary packagesPaul Eggleton2016-06-011-2/+4
| | | | | | | | | | | | | | If we use ${BP} for the subdirectory, the default value of S will work rather than having to have an ugly value derived from the package file name in both places. This does mean that we have to assume the default though (we can't just let the normal logic work because the value of BP is the default until later on, so the replacement doesn't work). (From OE-Core rev: 13bc2438d61c345a8f229b9d83bf36a14d08916f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: extract variable values from .deb/.ipk/.rpmPaul Eggleton2016-06-011-11/+94
| | | | | | | | | | | | | | Extract the metadata from package files and use it to set variable values in the recipe (including recipe name and version, LICENSE, SUMMARY, DESCRIPTION, SECTION and HOMEPAGE). For LICENSE we take care not to step on any value determined by our license file scan; if there is one we simply add a comment above the LICENSE setting so the user can resolve it. (From OE-Core rev: 19e6b661d38c5ae9b19d6340762c289830baba59) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: support extracting SUMMARY and HOMEPAGEPaul Eggleton2016-06-013-36/+54
| | | | | | | | | | | | | | | | | | Allow plugins to set any variable value through the extravalues dict, and use this to support extracting SUMMARY and HOMEPAGE values from spec files included with the source; additionally translate "License:" to a comment next to the LICENSE field (we have our own logic for setting LICENSE, but it will often be useful to see what the spec file says if one is present). Also use the same mechanism for setting the same variables for node.js modules; this was already supported but wasn't inserting the settings in the appropriate place in the file which this will now do. (From OE-Core rev: 91fc35ff5e89aa6d4c4ad945e45406fb4f71018e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: bootimg-efi: include startup.nsh if it's availableChristopher Larson2016-05-301-0/+5
| | | | | | | | | | | | | We want the system to boot on its own, rather than the user having to manually input the correct file at the EFI prompt. [YOCTO #9556] (From OE-Core rev: aa215c12d729c001ad3b8b98a7e203a9ad192211) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: clarify help text for --srcrev optionPaul Eggleton2016-05-251-1/+1
| | | | | | | | | | The -S / --srcrev option must be specified if fetching from a git repository, so spell that out in the help text. (From OE-Core rev: 1465f205c235a1688a85844ebf5259e8971038ae) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: tweak conflict handlingPaul Eggleton2016-05-251-3/+9
| | | | | | | | | | | | | | | | Make a couple of changes to the rebase operation: 1) Only wrap the actual rebase command in try...except since a failure in any of the other commands should be an error, not a warning 2) If it's a conflict (which unfortunately we can only tell by checking for the keyword "conflict" since git doesn't return error codes based on the type of error) then print a message clarifying that the user needs to resolve the issue themselves to finish the upgrade. (From OE-Core rev: 2a76be958432a35a0de30e9a5433089a54a06cad) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: handle upgrading recipes with a versioned inc filePaul Eggleton2016-05-251-0/+8
| | | | | | | | | | | | | | The gdb recipe in OE-Core has an inc file with the version in it; since the inc file is pulled in with a "require ${PV}.inc", when upgrading the recipe we need to also rename the inc file it will fail to parse and the upgrade itself will fail. Fixes [YOCTO #9574]. (From OE-Core rev: 3c623aac9333d20a62475279c72b6b6ec3d7dd6b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: drop support for local updatesPaul Eggleton2016-05-211-112/+76
| | | | | | | | | | | | | Having two code paths here makes maintenance difficult, and it doesn't seem likely that you would use the local case in real usage anyway, so drop the local support entirely. This should allow us to resolve [YOCTO #9301]. (From OE-Core rev: 7a4c9c96fee4fb514c2b69b52e811c4f896a16f1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix path parsing, use last occurrenceGeorge McCollister2016-05-201-1/+1
| | | | | | | | | | | If the path contains 'scripts' more than once the first occurrence will be incorrectly used. Use rfind instead of find to find the last occurrence. (From OE-Core rev: f30c486c17060d2f21618612804a692512ad6a57) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add help for --bmap commandline optionEd Bartosh2016-05-191-1/+4
| | | | | | | | | | | | Included description of -m/--bmap option to the help page produced by 'wic help create'. [YOCTO #9413] (From OE-Core rev: 7c749d4cfe1642d70a6b3643422ef69dec1775fe) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement --bmap optionEd Bartosh2016-05-194-12/+26
| | | | | | | | | | | | This option enables generation of <image>.bmap file for the result image using native bmaptool. [YOCTO #9413] (From OE-Core rev: d64c7b37c40b052510419b4d6629b83319c833e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add bmaptool to the list of utilitiesEd Bartosh2016-05-191-1/+2
| | | | | | | | | | | | | Added bmaptool -> bmap-tools pair to the dictionary executable -> recipe as bmaptool is going to be used by wic to generate .bmap file. [YOCTO #9413] (From OE-Core rev: 4684ac5f4d823a6afedc57aad0aa417bb17ba950) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use next builtin instead of .next methodEd Bartosh2016-05-142-2/+2
| | | | | | | | | | | | | Generators in Python 3 don't have .next method. It's recommended to use 'next' builtin instead. As it also present in Python >= 2.6 it should make wic code compatible with both Python 2 and Python 3. [YOCTO #9412] (From OE-Core rev: 9b7ab632e47d786dd979262015dbfb1254103f83) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: don't encode unicode stringsEd Bartosh2016-05-141-7/+0
| | | | | | | | | | | | | Removed check for unicode type as it doesn't work in Python 3. This check is not needed for wic as all its output seem to be strings. This allows to run code under both pythons. [YOCTO #9412] (From OE-Core rev: a56924b4a0102e401b5e37d857a08bab15da974e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: decode output of subprocess.communicateEd Bartosh2016-05-141-2/+2
| | | | | | | | | | | | | | stdeout and stderr content returned by communicate API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. Decoded stdout and stderr output to utf-8 to make the code working under both Python 2 and Python 3. (From OE-Core rev: 5b556f58a171e3d45107bb56a1f780e5c1abba37) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use // operator instead of /Ed Bartosh2016-05-142-10/+10
| | | | | | | | | | | | | | | Division operator works differently in Python 3. It results in float unlike in Python 2, where it results in int. Explicitly used "floor division" operator instead of 'division' operator. This should make the code to result in integer under both pythons. [YOCTO #9412] (From OE-Core rev: 997ff239bd753a7957cc14c6829b2f093d9bcef6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use find_executable in favor of bb.utils.whichEd Bartosh2016-05-141-8/+2
| | | | | | | | | | | | | | As bitbake is not ported to Python 3 yet it's better to avoid using its APIs as much as possible to be able to test wic under Python 3 at least partially. Used distutils.spawn.find_executable API in favor of bb.utils.which to get path of the command to run. (From OE-Core rev: 9658956bf8a5da779e06f71941de9b3e89415cdc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: don't use L suffix for integersEd Bartosh2016-05-141-4/+4
| | | | | | | | | | | | This suffix is not supported by Python 3. Wic code works without it on Python 2 too, so it's safe to remove it. [YOCTO #9412] (From OE-Core rev: 296db7e33bd71585cac63dc78c2c95bc619b4a86) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: refactor pluginbaseEd Bartosh2016-05-141-28/+14
| | | | | | | | | | | | | | | | | | | Wic plugin machinery implemented using metaclasses. Reimplemented plugin machinery using this advice from https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef Syntax for creating instances with different metaclasses is very different between Python 2 and 3. Use the ability to call type instances as a way to portably create such instances. Now it should work under both Python 2 and Python 3. [YOCTO #9412] (From OE-Core rev: e62fe5a41bdcdd72b9b257fecff7ccdc59c76d33) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove unused functionsEd Bartosh2016-05-141-68/+1
| | | | | | | | | | | | | Removed 'raw', 'ask', 'choice' and 'pause' functions from msger.py as they're not used in wic code and some of them use raw_input, which is not present in Python 3. [YOCTO #9412] (From OE-Core rev: eb87d591ef67f1953b2689430ef6c5a6a27a5b6e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use new syntax of 'except' statementEd Bartosh2016-05-143-3/+3
| | | | | | | | | | | | | | New syntax 'except Exception as err' is supported by Python >= 2.7. Old syntax 'except Exception, err' is not supported by Python 3. Used new syntax to be able to run wic on Python 3. [YOCTO #9412] (From OE-Core rev: 15e88714d6b0a93f72e8a19b083fcc1f2006e128) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove with_statement importsEd Bartosh2016-05-141-1/+0
| | | | | | | | | | | | | | 'with' statement is not used in baseimager.py It's supported by Python 2.7, which is included into all target distros. Other wic modules use this statement. Removed useless 'from __future__ import with_statement' from wic code. (From OE-Core rev: 528a1f20939589949831efbb4de6336776efe7d5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: don't inherit classes from objectEd Bartosh2016-05-146-6/+6
| | | | | | | | | | | | | | All classes in Python3 are new style classes and don't need to be inherited from object. Wic code works fine without this inheritance even with Python2, so it's harmless to remove it. [YOCTO #9412] (From OE-Core rev: a146b03ee7d0aa5bc1722da5977a5952782b69bf) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: don't use dict.keys and dict.has_keyEd Bartosh2016-05-143-5/+5
| | | | | | | | | | | | | Replaced calls of dict.keys and dict.has_key methods with the 'key in dict' statement. 'key in dict' is more pythonic, faster and readable. dict.has_key doesn't exist in Python 3. [YOCTO #9412] (From OE-Core rev: 003df7dfb932c551953fbf1bd769b3c31bd16fb4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use items instead of iteritemsEd Bartosh2016-05-144-5/+5
| | | | | | | | | | | | | Dictionary method 'iteritems' doesn't exist in Python 3. Replaced 'iteritems' with 'items' to be able to run the code under both Python 3 and Python 2. [YOCTO #9412] (From OE-Core rev: 5b14eb8d68aaca82de4f8f6bcb28ad6f4a5125d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>