1#!/usr/bin/env python2 2"""Switch part of the objects file in working set to (possible) bad ones.""" 3 4from __future__ import print_function 5 6import sys 7 8import common 9 10 11def Main(argv): 12 """Switch part of the objects file in working set to (possible) bad ones.""" 13 working_set = common.ReadWorkingSet() 14 objects_file = common.ReadObjectsFile() 15 object_index = common.ReadObjectIndex(argv[1]) 16 17 for oi in object_index: 18 working_set[oi] = objects_file[oi] 19 20 common.WriteWorkingSet(working_set) 21 22 return 0 23 24 25if __name__ == '__main__': 26 retval = Main(sys.argv) 27 sys.exit(retval) 28