def MigrateAllHuntsFinishedAndError(token=None):
 hunts_list = list(aff4.FACTORY.Open('aff4:/hunts', token=token).ListChildren())
 all_hunts = aff4.FACTORY.MultiOpen(hunts_list, aff4_type=hunts_implementation.GRRHunt, mode='r', age=aff4.ALL_TIMES, token=token)
 index = 0
 for hunt in all_hunts:
  MigrateHuntFinishedAndErrors(hunt, token=token)
  index += 1
  print ''
  print ('Done %d out of %d hunts.' % (index, len(hunts_list)))

def MigrateAllHuntsFinishedAndError ( token = None ) : hunts_list = list ( aff4 . FACTORY . Open ( 'aff4:/hunts' , token = token ) . ListChildren ( ) ) all_hunts = aff4 . FACTORY . MultiOpen ( hunts_list , aff4_type = hunts_implementation . GRRHunt , mode = 'r' , age = aff4 . ALL_TIMES , token = token ) index = 0 for hunt in all_hunts : MigrateHuntFinishedAndErrors ( hunt , token = token ) index += 1 print '' print ( 'Done %d out of %d hunts.' % ( index , len ( hunts_list ) ) )
migrates all hunts to collection-stored clients/errors lists .