From 165843ca10908d7bd79582829a5ee51b098685e6 Mon Sep 17 00:00:00 2001 From: Andrew Lassalle Date: Tue, 5 Nov 2019 13:30:34 -0800 Subject: update_payload: Port scripts to python3 Update the update_payload scripts to be compatible with python2 and python3. Python2 compatibility is needed since the repo is shared with Android. BUG=chromium:1011631 TEST=Executed aosp/system/update_engine/scripts/run_unittests and cros_generate_update_payload Cq-Depend: chromium:1904837, chromium:1911499 Change-Id: Ie450b80b5f7550051b38d320173ccc0c915f65e7 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1904310 Commit-Queue: Andrew Lassalle Tested-by: Andrew Lassalle Reviewed-by: Mike Frysinger Reviewed-by: Amin Hassani Auto-Submit: Andrew Lassalle --- scripts/update_payload/format_utils_unittest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/update_payload/format_utils_unittest.py') diff --git a/scripts/update_payload/format_utils_unittest.py b/scripts/update_payload/format_utils_unittest.py index 42ea621c..4dcd6527 100755 --- a/scripts/update_payload/format_utils_unittest.py +++ b/scripts/update_payload/format_utils_unittest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python # # Copyright (C) 2013 The Android Open Source Project # @@ -17,6 +17,11 @@ """Unit tests for format_utils.py.""" +# Disable check for function names to avoid errors based on old code +# pylint: disable-msg=invalid-name + +from __future__ import absolute_import + import unittest from update_payload import format_utils -- cgit v1.2.3