def setCmd(self, cmd):
cmd = cmd.upper()<EOL>if cmd not in VALID_COMMANDS:<EOL><INDENT>raise FrameError("<STR_LIT>" % (<EOL>cmd, VALID_COMMANDS, STOMP_VERSION)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self._cmd = cmd<EOL><DEDENT>
Check the cmd is valid, FrameError will be raised if its not.