Merge "Fix test flake"
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 4c390b4..091121f 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1424,9 +1424,10 @@
def ResolveBinaryPath(path):
if os.path.exists(path):
return path
- new_path = os.path.join(OPTIONS.search_path, path)
- if os.path.exists(new_path):
- return new_path
+ if OPTIONS.search_path:
+ new_path = os.path.join(OPTIONS.search_path, path)
+ if os.path.exists(new_path):
+ return new_path
raise ExternalError(
"Failed to find {}".format(new_path))