0001-use-python3-instead-of-python.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From cc3cb798375c5f47ea5c7579f32060933435e231 Mon Sep 17 00:00:00 2001
  2. From: Scott Branden <scott.branden@broadcom.com>
  3. Date: Fri, 27 Dec 2019 12:54:28 -0800
  4. Subject: [PATCH] use python3 instead of python
  5. use python3 instead of python as python2 is EOL January 2020.
  6. Signed-off-by: Scott Branden <scott.branden@broadcom.com>
  7. Reviewed-by: Jerome Forissier <jerome@forissier.org>
  8. Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, CFG_GCM_NIST_VECTORS=y)
  9. (cherry picked from commit 6271160639002a2580d80b75b5397a96d56329f2)
  10. Signed-off-by: Romain Naour <romain.naour@smile.fr>
  11. ---
  12. scripts/file_to_c.py | 4 ++--
  13. scripts/rsp_to_gcm_test.py | 2 +-
  14. 2 files changed, 3 insertions(+), 3 deletions(-)
  15. diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py
  16. index ae16f52..b4ce2a2 100755
  17. --- a/scripts/file_to_c.py
  18. +++ b/scripts/file_to_c.py
  19. @@ -1,4 +1,4 @@
  20. -#!/usr/bin/env python
  21. +#!/usr/bin/env python3
  22. # SPDX-License-Identifier: BSD-2-Clause
  23. #
  24. # Copyright (c) 2018, Linaro Limited
  25. @@ -29,7 +29,7 @@ def main():
  26. f.write("const uint8_t " + args.name + "[] = {\n")
  27. i = 0
  28. - for x in array.array("B", inf.read()):
  29. + for x in array.array("B", map(ord, (inf.read()))):
  30. f.write("0x" + '{0:02x}'.format(x) + ",")
  31. i = i + 1
  32. if i % 8 == 0:
  33. diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py
  34. index 0543541..e4418be 100755
  35. --- a/scripts/rsp_to_gcm_test.py
  36. +++ b/scripts/rsp_to_gcm_test.py
  37. @@ -1,4 +1,4 @@
  38. -#!/usr/bin/env python
  39. +#!/usr/bin/env python3
  40. modes = {'encrypt': 0, 'decrypt': 1}
  41. --
  42. 2.24.1