def update_meta_info(rec_dir, meta_info):
 logger.info('Updating meta info')
 meta_info_path = os.path.join(rec_dir, 'info.csv')
 meta_info_old_path = os.path.join(rec_dir, 'info_old.csv')
 shutil.copy2(meta_info_path, meta_info_old_path)
 with open(meta_info_path, 'w', newline='') as csvfile:
  csv_utils.write_key_value_file(csvfile, meta_info)

def update_meta_info ( rec_dir , meta_info ) : logger . info ( 'Updating meta info' ) meta_info_path = os . path . join ( rec_dir , 'info.csv' ) meta_info_old_path = os . path . join ( rec_dir , 'info_old.csv' ) shutil . copy2 ( meta_info_path , meta_info_old_path ) with open ( meta_info_path , 'w' , newline = '' ) as csvfile : csv_utils . write_key_value_file ( csvfile , meta_info )
backup old meta info file .