def summarize(args): js = JsonSummary() for fname in args.json: lo.info('processing ' + fname) js.add(fname) js.dump()
def do_export(): js = JsonSummary() for jpath in self.jpaths: if bj.canceled: break bj.message = 'extracting from ' + os.path.basename(jpath) try: js.add(jpath) stats['n'] += 1 except Exception as e: lo.error('could not load %s : %s'%(jpath, e)) continue try: js.dump(file(fname, 'w')) except IOError as e: lo.error('could not write to file %s : %s' % (fname, e))