Fix internal test update check when data files are removed
Bug: b/297302759
Change-Id: I15dbdb112576f9b3543fef92a98318477db760ac
diff --git a/tools/internal_test.py b/tools/internal_test.py
index 12c41f9..e8a4f5a 100755
--- a/tools/internal_test.py
+++ b/tools/internal_test.py
@@ -149,8 +149,9 @@
with open(sys.argv[0], 'r') as us:
contents.append(us.read())
for deps in BENCHMARK_APPS + DEPENDENT_PYTHON_FILES:
- with open(deps.__file__, 'r') as us:
- contents.append(us.read())
+ if os.path.exists(deps.__file__):
+ with open(deps.__file__, 'r') as us:
+ contents.append(us.read())
return contents
def restart_if_new_version(original_contents):