def rename_renewal_config(prev_name, new_name, cli_config):
 prev_filename = renewal_filename_for_lineagename(cli_config, prev_name)
 new_filename = renewal_filename_for_lineagename(cli_config, new_name)
 if os.path.exists(new_filename):
  raise errors.ConfigurationError('The new certificate name is already in use.')
 try:
  os.rename(prev_filename, new_filename)
 except OSError:
  raise errors.ConfigurationError('Please specify a valid filename for the new certificate name.')

def rename_renewal_config ( prev_name , new_name , cli_config ) : prev_filename = renewal_filename_for_lineagename ( cli_config , prev_name ) new_filename = renewal_filename_for_lineagename ( cli_config , new_name ) if os . path . exists ( new_filename ) : raise errors . ConfigurationError ( 'The new certificate name is already in use.' ) try : os . rename ( prev_filename , new_filename ) except OSError : raise errors . ConfigurationError ( 'Please specify a valid filename for the new certificate name.' )
renames cli_config .