HADOOP-17703. checkcompatibility.py errors out when specifying annotations. (#3017)

Reviewed-by: Akira Ajisaka <aajisaka@apache.org>
(cherry picked from commit 110cda3de63e1e483c207085207f5d73d7b8adfd)
(cherry picked from commit 0df47432847e1a8b9f3cd31d60b3003fc5a8bc9b)
(cherry picked from commit 2823d77f19efebff17a6c07e38a1f4be92c52404)
This commit is contained in:
Wei-Chiu Chuang 2021-05-17 20:21:54 -07:00
parent e0b84c45d1
commit d4f45100c7
No known key found for this signature in database
GPG Key ID: B362E1C021854B9D

View File

@ -175,7 +175,7 @@ def run_java_acc(src_name, src_jars, dst_name, dst_jars, annotations):
if annotations is not None:
annotations_path = os.path.join(get_scratch_dir(), "annotations.txt")
with file(annotations_path, "w") as f:
with open(annotations_path, "w") as f:
for ann in annotations:
print(ann, file=f)
args += ["-annotations-list", annotations_path]