def add_ls_data(script):
 def notimplemented(script):
  sys.stderr.write(('WARNING: migration not implemented for script %(id)r\n' % script))
  raise NotImplementedError
 return {'smb-ls': add_smb_ls_data, 'nfs-ls': add_nfs_ls_data, 'afp-ls': add_afp_ls_data, 'ftp-anon': add_ftp_anon_data}.get(script['id'], notimplemented)(script)

def add_ls_data ( script ) : def notimplemented ( script ) : sys . stderr . write ( ( 'WARNING: migration not implemented for script %(id)r\n' % script ) ) raise NotImplementedError return { 'smb-ls' : add_smb_ls_data , 'nfs-ls' : add_nfs_ls_data , 'afp-ls' : add_afp_ls_data , 'ftp-anon' : add_ftp_anon_data } . get ( script [ 'id' ] , notimplemented ) ( script )
this function calls the appropriate add_*_data() function to convert output from scripts that do not include a structured output to a structured output similar to the one provided by the "ls" nse module .