From: W. Trevor King Date: Wed, 25 Aug 2010 16:56:21 +0000 (-0400) Subject: Use type='int' for --port argument. Also cookbook->chemdb auth realm. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b2e78d77d1ecba82670c47b5413faf285f8e3b6;p=chemdb.git Use type='int' for --port argument. Also cookbook->chemdb auth realm. --- diff --git a/chemdb/server.py b/chemdb/server.py index aadc551..2db25a3 100644 --- a/chemdb/server.py +++ b/chemdb/server.py @@ -254,7 +254,7 @@ class ServerDaemon (Daemon): p.add_option('-a', '--address', dest='address', default='127.0.0.1', metavar='ADDR', help='Address that the server will bind to (%default).') - p.add_option('-p', '--port', dest='port', default='8080', + p.add_option('-p', '--port', dest='port', default=8080, type='int', metavar='PORT', help='Port that the server will listen on (%default).') p.add_option('-s', '--secure', dest="secure", @@ -320,7 +320,7 @@ class ServerDaemon (Daemon): if cherrypy.__version__.startswith('3.'): cherrypy.config.update({ # http://www.cherrypy.org/wiki/ConfigAPI 'server.socket_host': self.options.address, - 'server.socket_port': int(self.options.port), + 'server.socket_port': self.options.port, 'tools.decode.on': True, 'tools.encode.on': True, 'tools.encode.encoding': 'utf8', @@ -336,7 +336,7 @@ class ServerDaemon (Daemon): else: digest_auth = { 'tools.auth_digest.on': True, - 'tools.auth_digest.realm': 'cookbook', + 'tools.auth_digest.realm': 'chemdb', 'tools.auth_digest.get_ha1': get_ha1, 'tools.auth_digest.key': str(uuid.uuid4()), } @@ -352,7 +352,7 @@ class ServerDaemon (Daemon): else: digest_auth = { 'tools.digest_auth.on': True, - 'tools.digest_auth.realm': 'cookbook', + 'tools.digest_auth.realm': 'chemdb', 'tools.digest_auth.users': passwds, } app_config = {