我正在尝试按照本指南“ https://code.google.com/p/websocket-sample/wiki/HowToInstallMod_pywebsocket ”在 CentOS 5.9 32 位上安装“mod_pywebsocket ”
但是使用命令“sudo python setup.py install”我看到一个错误:
[root@localhost src]# python setup.py install
running install
running build
running build_py
running install_lib
byte-compiling /usr/lib/python2.4/site-packages/mod_pywebsocket/mux.py to mux.pyc
File "/usr/lib/python2.4/site-packages/mod_pywebsocket/mux.py", line 926
finally:
^
SyntaxError: invalid syntax
[root@localhost src]#
这里有几行“mux.py”文件:
916 Writing data will block the worker so we need to release
# _send_condition before writing.
self._logger.debug('Sending inner frame: %r' % inner_frame)
self._request.connection.write(inner_frame)
write_position += write_length
opcode = common.OPCODE_CONTINUATION
except ValueError, e:
raise BadOperationException(e)
926 finally:
self._write_inner_frame_semaphore.release()
def replenish_send_quota(self, send_quota):
"""Replenish send quota."""
try:
self._send_condition.acquire()
if self._send_quota + send_quota > 0x7FFFFFFFFFFFFFFF:
self._send_quota = 0
raise LogicalChannelError(
这是什么意思?我必须做什么?