diff --git a/tests/test_mediaworker.py b/tests/test_mediaworker.py
index aa8b3aadb02cc83abebd6145deb6bc1ecd7740a3..74db20dcce0b267dc179648817c3ae5776e8510a 100755
--- a/tests/test_mediaworker.py
+++ b/tests/test_mediaworker.py
@@ -51,7 +51,10 @@ def check_celerity_connectivity(ip):
     h = conf.get('MS_SERVER_NAME')
     cmd = "ssh %s curl -k https://%s:6200" % (ip, h)
     print('Checking celerity connectivity: %s' % cmd)
-    d = subprocess.check_output(cmd, shell=True, timeout=5)
+    try:
+        d = subprocess.check_output(cmd, shell=True, timeout=5)
+    except exception:
+        d = ''
     if "Celerity tasks server" in d:
         print('%sSuccessfully reached tasks server%s' % (GREEN, DEF))
         return True