Merge "Migrate build/ to Python 3"
This commit is contained in:
commit
a1a894be50
3 changed files with 3 additions and 9 deletions
|
@ -31,12 +31,4 @@ python_binary_host {
|
|||
"secilc",
|
||||
"version_policy",
|
||||
],
|
||||
version: {
|
||||
py2: {
|
||||
enabled: true,
|
||||
},
|
||||
py3: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
2
build/build_sepolicy.py
Normal file → Executable file
2
build/build_sepolicy.py
Normal file → Executable file
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright 2018 - The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
|
|
@ -39,7 +39,7 @@ def filter_out(pattern_files, input_file):
|
|||
patterns.extend(open(f).readlines())
|
||||
|
||||
# Copy lines that are not in the pattern.
|
||||
tmp_output = tempfile.NamedTemporaryFile()
|
||||
tmp_output = tempfile.NamedTemporaryFile(mode='w+')
|
||||
with open(input_file, 'r') as in_file:
|
||||
tmp_output.writelines(line for line in in_file.readlines()
|
||||
if line not in patterns)
|
||||
|
|
Loading…
Reference in a new issue