def valid_fileproto(uri):
 try:
  return bool(re.match('^(?:salt|https?|ftp)://', uri))
 except Exception:
  return False

def valid_fileproto ( uri ) : try : return bool ( re . match ( '^(?:salt|https?|ftp)://' , uri ) ) except Exception : return False
returns a boolean value based on whether or not the uri passed has a valid remote file protocol designation cli example: .