Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 2774:22c381f3f448
respect function argument 'port' in run()
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Mon, 18 Oct 2004 07:43:58 +0000 |
| parents | 6fb4b692c133 |
| children | 9a6b451b1ba6 |
comparison
equal
deleted
inserted
replaced
| 2773:6fb4b692c133 | 2774:22c381f3f448 |
|---|---|
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 16 # | 16 # |
| 17 | 17 |
| 18 """Command-line script that runs a server over roundup.cgi.client. | 18 """Command-line script that runs a server over roundup.cgi.client. |
| 19 | 19 |
| 20 $Id: roundup_server.py,v 1.65 2004-10-17 18:22:32 a1s Exp $ | 20 $Id: roundup_server.py,v 1.66 2004-10-18 07:43:58 a1s Exp $ |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 24 # python version check | 24 # python version check |
| 25 from roundup import configuration, version_check | 25 from roundup import configuration, version_check |
| 590 # any of the above options prevent server from running | 590 # any of the above options prevent server from running |
| 591 return | 591 return |
| 592 | 592 |
| 593 RoundupRequestHandler.LOG_IPADDRESS = not config.LOG_HOSTNAMES | 593 RoundupRequestHandler.LOG_IPADDRESS = not config.LOG_HOSTNAMES |
| 594 | 594 |
| 595 # obtain server before changing user id - allows to use port < | 595 # port number in function arguments overrides config and command line |
| 596 # 1024 if started as root | 596 if port is not undefined: |
| 597 config.PORT = port | |
| 598 | |
| 599 # obtain server before changing user id - allows | |
| 600 # to use port < 1024 if started as root | |
| 597 try: | 601 try: |
| 598 httpd = server_class((config.HOST, config.PORT), RoundupRequestHandler) | 602 httpd = server_class((config.HOST, config.PORT), RoundupRequestHandler) |
| 599 except socket.error, e: | 603 except socket.error, e: |
| 600 if e[0] == errno.EADDRINUSE: | 604 if e[0] == errno.EADDRINUSE: |
| 601 raise socket.error, \ | 605 raise socket.error, \ |
