def dump_dbs3_json(dn, block_dump_iter): for blockDump in block_dump_iter: fp = open( os.path.join( dn, blockDump['block']['block_name'].strip('/').replace('/', '_') + '.json'), 'w') json.dump(blockDump, fp) fp.close()
def dump_dbs3_json(dn, block_dump_iter): for blockDump in block_dump_iter: fp = open(os.path.join(dn, blockDump['block']['block_name'] + '.json'), 'w') json.dump(blockDump, fp) fp.close()
def _write_task_info(self): outfile = open(self._output_fn, 'w') json.dump(self._task_info, outfile) outfile.close()