Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-03-2020, 12:30 AM
kva kva is offline
Registered User
 
Join Date: Jul 2020
Posts: 11
Exception for "The specified network name is no longer available"

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?
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:16 AM.