def nzb_redirect(wdir, nzbname, pp, script, cat, priority):
 files = []
 for (root, _dirs, names) in os.walk(wdir):
  for name in names:
   files.append(os.path.join(root, name))
 for file_ in files:
  if (os.path.splitext(file_)[1].lower() != '.nzb'):
   return None
 if (len(files) != 1):
  nzbname = None
 for file_ in files:
  dirscanner.ProcessSingleFile(os.path.split(file_)[1], file_, pp, script, cat, priority=priority, keep=False, dup_check=False, nzbname=nzbname)
 return files

def nzb_redirect ( wdir , nzbname , pp , script , cat , priority ) : files = [ ] for ( root , _dirs , names ) in os . walk ( wdir ) : for name in names : files . append ( os . path . join ( root , name ) ) for file_ in files : if ( os . path . splitext ( file_ ) [ 1 ] . lower ( ) != '.nzb' ) : return None if ( len ( files ) != 1 ) : nzbname = None for file_ in files : dirscanner . ProcessSingleFile ( os . path . split ( file_ ) [ 1 ] , file_ , pp , script , cat , priority = priority , keep = False , dup_check = False , nzbname = nzbname ) return files
check if this job contains only nzb files .