Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.4/site-packages/cherrypy/_cpserver.py", line
171, in _start_http
self.httpserver.start()
File "/usr/lib/python2.4/site-packages/cherrypy/_cpwsgiserver.py",
line 308, in start
self.socket.bind(self.bind_addr)
File "<string>", line 1, in bind
TypeError: an integer is required
I think that the error is at line 142 of profiler.py, that should be
changed from
cherrypy.config.update({'server.socketPort': port,
to
cherrypy.config.update({'server.socketPort': int(port),
Because if I call
python profiler.py /var/www/myapp/profile 8000
the "8000" is a string in the sys.argv list, not an integer (required
by socket.bind, I presume).
Regards