def exec_command(self):
if not self.original_command_string:<EOL><INDENT>raise SSHEnvironmentError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>command_info = {'<STR_LIT>': self.get_client_ip(),<EOL>'<STR_LIT>': self.keyname,<EOL>'<STR_LIT>': self.original_command_string,<EOL>'<STR_LIT:time>': time.time()}<EOL>os.environ['<STR_LIT>'] = self.keyname<EOL>retcode = <NUM_LIT><EOL>try:<EOL><INDENT>match = self.find_match()<EOL>command_info['<STR_LIT>'] = match.get('<STR_LIT>')<EOL>self.logdebug('<STR_LIT>' % match)<EOL>command = match['<STR_LIT>']<EOL>retcode = subprocess.call(command)<EOL>command_info['<STR_LIT:code>'] = retcode<EOL>self.log('<STR_LIT>' % command_info)<EOL>sys.exit(retcode)<EOL><DEDENT>except (CommandRejected, OSError) as err:<EOL><INDENT>command_info['<STR_LIT>'] = '<STR_LIT:%s>' % err<EOL>self.log('<STR_LIT>' % command_info)<EOL>sys.exit(retcode)<EOL><DEDENT>
Glean the command to run and exec.

        On problems, sys.exit.
        This method should *never* return.