def has_the_key(self, key): with quiet(): _has_the_key = run('grep --color=never "^{} *=" {}'.format(key, self.filename)).succeeded return _has_the_key