Question

> retry = range(3) 
> for attempt in retry:
         try:
>            try:
>                tn = telnetlib.Telnet(HOST)
>            except exception  as e:
>                 log error
> 
>             firing cmd
>             break    
          except Exception as e: 
>               log error    
>         finally:
>               telnet close

Is the best way or how many times i can retry in telnet lib.best way need.

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top