def check_keyname(self, rule):
keynames = rule.get('<STR_LIT>')<EOL>if not keynames:<EOL><INDENT>self.logdebug('<STR_LIT>')<EOL>return True<EOL><DEDENT>if not isinstance(keynames, list):<EOL><INDENT>keynames = [keynames]<EOL><DEDENT>if self.keyname in keynames:<EOL><INDENT>self.logdebug('<STR_LIT>' % self.keyname)<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>self.logdebug('<STR_LIT>' % self.keyname)<EOL>return False<EOL><DEDENT>
If a key name is specified, verify it is permitted.