Fix --run-bootstrap for build.py
FileNotFound exception when unlinking a non-existent path.
Bug: 217952161
Test: Bootstrap completes when common-mk folder doesn't exist
Tag: #floss
Change-Id: Id7dba2a68e67353a557b2745c33d5b974e595470
diff --git a/build.py b/build.py
index c62b800..0bdbd16 100755
--- a/build.py
+++ b/build.py
@@ -610,7 +610,10 @@
# Create symlinks
for pairs in symlinks:
(src, dst) = pairs
- os.unlink(dst)
+ try:
+ os.unlink(dst)
+ except Exception as e:
+ print(e)
os.symlink(src, dst)
# Write to setup complete file so we don't repeat this step