remote_access: IsDirWritable: combine two ssh commands
Since RemoteSh runs a shell, we can join the two `touch;rm` commands into
a single ssh connection. This gives a minor speed up.
BUG=brillo:985
TEST=`cros deploy` still works and is able to run verify write access
TEST=`./cbuildbot/run_tests` passes
Change-Id: I273b37c5f76456711da61249b6b92bb603e2fc02
Reviewed-on: https://chromium-review.googlesource.com/272801
Reviewed-by: Yiming Chen <yimingc@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index 10ff561..5209e2b 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -216,7 +216,7 @@
error_code_ok=error_code_ok,
capture_output=True)
if (result.returncode and
- not self.device.IsPathWritable(self.options.target_dir)):
+ not self.device.IsDirWritable(self.options.target_dir)):
self._target_dir_is_still_readonly.set()
def _GetDeviceInfo(self):