def default_channel():
 try:
  chan = _open_session()
 except ssh.SSHException as err:
  if (str(err) == 'SSH session not active'):
   connections[env.host_string].close()
   del connections[env.host_string]
   chan = _open_session()
  else:
   raise
 chan.settimeout(0.1)
 chan.input_enabled = True
 return chan

def default_channel ( ) : try : chan = _open_session ( ) except ssh . SSHException as err : if ( str ( err ) == 'SSH session not active' ) : connections [ env . host_string ] . close ( ) del connections [ env . host_string ] chan = _open_session ( ) else : raise chan . settimeout ( 0.1 ) chan . input_enabled = True return chan
return a channel object based on env .