def _walk_through(job_dir):
 serial = salt.payload.Serial(__opts__)
 for top in os.listdir(job_dir):
  t_path = os.path.join(job_dir, top)
  for final in os.listdir(t_path):
   load_path = os.path.join(t_path, final, LOAD_P)
   if (not os.path.isfile(load_path)):
    continue
   job = serial.load(salt.utils.fopen(load_path, 'rb'))
   jid = job['jid']
   (yield (jid, job, t_path, final))

def _walk_through ( job_dir ) : serial = salt . payload . Serial ( __opts__ ) for top in os . listdir ( job_dir ) : t_path = os . path . join ( job_dir , top ) for final in os . listdir ( t_path ) : load_path = os . path . join ( t_path , final , LOAD_P ) if ( not os . path . isfile ( load_path ) ) : continue job = serial . load ( salt . utils . fopen ( load_path , 'rb' ) ) jid = job [ 'jid' ] ( yield ( jid , job , t_path , final ) )
walk through the job dir and return jobs .