def _connect(self):
if self._socketFile is not None:<EOL><INDENT>if not os.path.exists(self._socketFile):<EOL><INDENT>raise Exception("<STR_LIT>"<EOL>% self._socketFile)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if self._timeout is not None:<EOL><INDENT>self._conn = util.Telnet(self._host, self._port, self._socketFile, <EOL>timeout)<EOL><DEDENT>else:<EOL><INDENT>self._conn = util.Telnet(self._host, self._port, self._socketFile)<EOL><DEDENT><DEDENT>except:     <EOL><INDENT>raise Exception("<STR_LIT>" % self._instanceName)<EOL><DEDENT>
Connect to Memcached.