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

This commit is contained in:
Gaute Lindkvist 2019-06-06 14:37:57 +02:00
parent eaf795112f
commit 8ca8d5d2d8

View File

@ -90,12 +90,15 @@ class Instance:
connectionOk, versionOk = self.checkVersion()
if connectionOk:
break
time.sleep(0.5)
time.sleep(1.0)
else:
connectionOk, versionOk = self.checkVersion()
if not connectionOk:
raise Exception('Error: Could not connect to resinsight at ', location)
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)
exit(1)
if not versionOk:
raise Exception('Error: Wrong Version of ResInsight at ', location)