def _avoid_invalidating_lineage(config, lineage, original_server):
 latest_cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(lineage.cert).read())
 now_valid = ('fake' not in repr(latest_cert.get_issuer()).lower())
 if util.is_staging(config.server):
  if ((not util.is_staging(original_server)) or now_valid):
   if (not config.break_my_certs):
    names = ', '.join(lineage.names())
    raise errors.Error("You've asked to renew/replace a seemingly valid certificate with a test certificate (domains: {0}). We will not do that unless you use the --break-my-certs flag!".format(names))

def _avoid_invalidating_lineage ( config , lineage , original_server ) : latest_cert = OpenSSL . crypto . load_certificate ( OpenSSL . crypto . FILETYPE_PEM , open ( lineage . cert ) . read ( ) ) now_valid = ( 'fake' not in repr ( latest_cert . get_issuer ( ) ) . lower ( ) ) if util . is_staging ( config . server ) : if ( ( not util . is_staging ( original_server ) ) or now_valid ) : if ( not config . break_my_certs ) : names = ', ' . join ( lineage . names ( ) ) raise errors . Error ( "You've asked to renew/replace a seemingly valid certificate with a test certificate (domains: {0}). We will not do that unless you use the --break-my-certs flag!" . format ( names ) )
do not renew a valid cert with one from a staging server! .