OSDN Git Service

tests/vm: Port basevm to Python 3
authorWainer dos Santos Moschetta <wainersm@redhat.com>
Fri, 29 Mar 2019 21:08:01 +0000 (17:08 -0400)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 12 Jun 2019 16:53:22 +0000 (17:53 +0100)
commit3ad3e36e1469a37740b5ec41d8d917c5ecd40c16
tree64701c27cc7e56f3b8e81e450041f7728f9d4131
parentb0040fa17bcf0e51d4a599ee82108ace830d4eac
tests/vm: Port basevm to Python 3

Fixed tests/vm/basevm.py to run with Python 3:
 - hashlib.sha1() requires an binary encoded object.
 - uses floor division ("//") (PEP 238).
 - decode bytes to unicode when needed.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190329210804.22121-3-wainersm@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
tests/vm/basevm.py