summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2015-03-19 14:31:16 +0000
committerGerrit Code Review <gerrit@baserock.org>2015-03-19 14:31:16 +0000
commit6c883efee015f03a4d65d68ec971d56c4d42760c (patch)
tree45681e130d10a216f6c8e78ae4569dca4abde16f
parent2fc8e2ad8c7a8b80eab680f96d24115d0ce27b19 (diff)
parentaaef5cfe335ebbe742b7eb1593ec51bbeeb4dc7c (diff)
downloaddefinitions-6c883efee015f03a4d65d68ec971d56c4d42760c.tar.gz
Merge "deploy: Tighten SSH connectivity check"
-rw-r--r--writeexts.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/writeexts.py b/writeexts.py
index 129b2bc4..aa185a2b 100644
--- a/writeexts.py
+++ b/writeexts.py
@@ -604,12 +604,16 @@ class WriteExtension(cliapp.Application):
def check_ssh_connectivity(self, ssh_host):
try:
- cliapp.ssh_runcmd(ssh_host, ['true'])
+ output = cliapp.ssh_runcmd(ssh_host, ['echo', 'test'])
except cliapp.AppException as e:
logging.error("Error checking SSH connectivity: %s", str(e))
raise cliapp.AppException(
'Unable to SSH to %s: %s' % (ssh_host, e))
+ if output.strip() != 'test':
+ raise cliapp.AppException(
+ 'Unexpected output from remote machine: %s' % output.strip())
+
def is_device(self, location):
try:
st = os.stat(location)