sync_chrome: ignore missing directories when trying to clobber
BUG=chromium:620015
TEST=unit tests
Change-Id: I2e022466533fe5740792a75ae5bfb35c7b99f407
Reviewed-on: https://chromium-review.googlesource.com/352720
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index 47efdfa..7becdd7 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -67,7 +67,7 @@
except cros_build_lib.RunCommandError:
# If we have an error resetting, or syncing, we clobber, and fresh sync.
logging.warning('Chrome checkout appears corrupt. Clobbering.')
- osutils.RmDir(options.chrome_root)
+ osutils.RmDir(options.chrome_root, ignore_missing=True)
osutils.SafeMakedirs(options.chrome_root)
SyncChrome(gclient_path, options)