aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Farsi <lucafarsi@google.com>2023-08-03 00:35:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-03 00:35:07 +0000
commit18cd0bdd23bb78b597a43516f51bbfbdb87a2fd7 (patch)
tree771e162949b223db09e3cb0304f5817c301596cb
parent0a22d1d57c75df302c78dfc53733f6d628074ba5 (diff)
parent8274d83120fd7bc4176385d50fe02551eee54221 (diff)
downloadminijail-18cd0bdd23bb78b597a43516f51bbfbdb87a2fd7.tar.gz
UPSTREAM: Fix Python deprecation warnings am: 916b5cd784 am: 246f2047ab am: 8274d83120
Original change: https://android-review.googlesource.com/c/platform/external/minijail/+/2691187 Change-Id: I8688f925dd883bf7cbb95cae37a6afb7843390c6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-xtools/compiler_unittest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/compiler_unittest.py b/tools/compiler_unittest.py
index b1592d2..19ca72f 100755
--- a/tools/compiler_unittest.py
+++ b/tools/compiler_unittest.py
@@ -404,7 +404,8 @@ class CompileFileTests(unittest.TestCase):
num_entries = 64 * (i + 1) // iterations
syscalls = dict(
zip(
- random.sample(self.arch.syscalls.keys(), num_entries),
+ random.sample(
+ list(self.arch.syscalls.keys()), num_entries),
(random.randint(1, 1024) for _ in range(num_entries)),
))
@@ -479,7 +480,8 @@ class CompileFileTests(unittest.TestCase):
# codegen layer will coalesce filters that compile to the same
# instructions.
policy_contents = []
- for name in random.sample(self.arch.syscalls.keys(), num_entries):
+ for name in random.sample(
+ list(self.arch.syscalls.keys()), num_entries):
values = random.sample(range(1024), num_entries)
syscalls[name] = values
policy_contents.append(