def contains(path, text):
 path = os.path.expanduser(path)
 if (not os.path.exists(path)):
  return False
 stripped_text = str(text).strip()
 try:
  with salt.utils.filebuffer.BufferedReader(path) as breader:
   for chunk in breader:
    if (stripped_text in chunk):
     return True
  return False
 except (IOError, OSError):
  return False

def contains ( path , text ) : path = os . path . expanduser ( path ) if ( not os . path . exists ( path ) ) : return False stripped_text = str ( text ) . strip ( ) try : with salt . utils . filebuffer . BufferedReader ( path ) as breader : for chunk in breader : if ( stripped_text in chunk ) : return True return False except ( IOError , OSError ) : return False
checks if the specified bank contains the specified key .