def _validate_cert_format(name):
 cert_formats = ['cer', 'pfx']
 if (name not in cert_formats):
  message = "Invalid certificate format '{0}' specified. Valid formats: {1}".format(name, cert_formats)
  raise SaltInvocationError(message)

def _validate_cert_format ( name ) : cert_formats = [ 'cer' , 'pfx' ] if ( name not in cert_formats ) : message = "Invalid certificate format '{0}' specified. Valid formats: {1}" . format ( name , cert_formats ) raise SaltInvocationError ( message )
ensure that the certificate format .