The common part of my script is
Code:
def connect():
global nr
for i in range(60):
if not tab.Session.Connected:
try:
tab.Session.Connect()
nr = tab.Screen.WaitForStrings('#', 20)
break
except ScriptError:
pass
else:
nr = True
break
else:
return False
return nr
def main():
global nr
sending, waitingforstring, etc
tab = crt.GetScriptTab()
tab.Screen.Synchronous = True
tab.Screen.IgnoreEscape = True
if connect():
main()
Sometimes when script tries to connect to unavailable device, the pop-up window tells me: "The specified network name is no longer available". ScriptError does not handle this error? Which exception should?