UPSTREAM: Fix Python deprecation warnings am: 916b5cd784 am: 246f2047ab am: 8274d83120 am: 18cd0bdd23

Original change: https://android-review.googlesource.com/c/platform/external/minijail/+/2691187

Change-Id: I9709f651988c82bd4fbad8cf7600c0b260e6703d
Signed-off-by: Automerger Merge Worker <[email protected]>
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 @@
             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 @@
         # 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(