def _handle_subset_cert_request(config, domains, cert):
 existing = ', '.join(cert.names())
 question = 'You have an existing certificate that contains a portion of the domains you requested (ref: {0}){br}{br}It contains these names: {1}{br}{br}You requested these names for the new certificate: {2}.{br}{br}Do you want to expand and replace this existing certificate with the new certificate?'.format(cert.configfile.filename, existing, ', '.join(domains), br=os.linesep)
 if (config.expand or config.renew_by_default or zope.component.getUtility(interfaces.IDisplay).yesno(question, 'Expand', 'Cancel', cli_flag='--expand', force_interactive=True)):
  return ('renew', cert)
 else:
  reporter_util = zope.component.getUtility(interfaces.IReporter)
  reporter_util.add_message('To obtain a new certificate that contains these names without replacing your existing certificate for {0}, you must use the --duplicate option.{br}{br}For example:{br}{br}{1} --duplicate {2}'.format(existing, sys.argv[0], ' '.join(sys.argv[1:]), br=os.linesep), reporter_util.HIGH_PRIORITY)
  raise errors.Error(USER_CANCELLED)

def _handle_subset_cert_request ( config , domains , cert ) : existing = ', ' . join ( cert . names ( ) ) question = 'You have an existing certificate that contains a portion of the domains you requested (ref: {0}){br}{br}It contains these names: {1}{br}{br}You requested these names for the new certificate: {2}.{br}{br}Do you want to expand and replace this existing certificate with the new certificate?' . format ( cert . configfile . filename , existing , ', ' . join ( domains ) , br = os . linesep ) if ( config . expand or config . renew_by_default or zope . component . getUtility ( interfaces . IDisplay ) . yesno ( question , 'Expand' , 'Cancel' , cli_flag = '--expand' , force_interactive = True ) ) : return ( 'renew' , cert ) else : reporter_util = zope . component . getUtility ( interfaces . IReporter ) reporter_util . add_message ( 'To obtain a new certificate that contains these names without replacing your existing certificate for {0}, you must use the --duplicate option.{br}{br}For example:{br}{br}{1} --duplicate {2}' . format ( existing , sys . argv [ 0 ] , ' ' . join ( sys . argv [ 1 : ] ) , br = os . linesep ) , reporter_util . HIGH_PRIORITY ) raise errors . Error ( USER_CANCELLED )
figure out what to do if a previous cert had a subset of the names now requested .