Python: increase timeout for looking and more informative error message if it fails

This commit is contained in:
Gaute Lindkvist committed 2019-06-06 14:37:57 +02:00
1 parent eaf795112f
commit 8ca8d5d2d8
1 file changed
+4 -1
@@ -90,11 +90,14 @@ class Instance:
connectionOk, versionOk = self.checkVersion() connectionOk, versionOk = self.checkVersion()
if connectionOk: if connectionOk:
break break
time.sleep(0.5) time.sleep(1.0)
else: else:
connectionOk, versionOk = self.checkVersion() connectionOk, versionOk = self.checkVersion()
if not connectionOk: if not connectionOk:
if launched:
raise Exception('Error: Could not connect to resinsight at ', location, ' after trying 10 times with 1 second apart')
else:
raise Exception('Error: Could not connect to resinsight at ', location) raise Exception('Error: Could not connect to resinsight at ', location)
exit(1) exit(1)
if not versionOk: if not versionOk: