def validate_env(self, envname):
if self.whitelist_envs and envname in self.whitelist_envs:<EOL><INDENT>return True<EOL><DEDENT>elif self.whitelist_envs:<EOL><INDENT>return False<EOL><DEDENT>if self.blacklist_envs and envname not in self.blacklist_envs:<EOL><INDENT>return True<EOL><DEDENT>elif self.blacklist_envs:<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Check the name of the environment against the black list and the
whitelist. If a whitelist is specified only it is checked.