Skip to content

Commit

Permalink
Simplify a bit (in response to jgraham review).
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Mar 11, 2014
1 parent b979ab5 commit 110665f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions serve.py
Expand Up @@ -164,17 +164,13 @@ def start_https_server(config, paths, port, bind_hostname):
class WebSocketDaemon(object):
def __init__(self, host, port, doc_root, handlers_root, log_level, bind_hostname):
self.host = host
cmd_args = ["-p", port,
"-d", doc_root,
"-w", handlers_root,
"--log-level", log_level]
if (bind_hostname):
opts, args = pywebsocket._parse_args_and_config(["-H", host,
"-p", port,
"-d", doc_root,
"-w", handlers_root,
"--log-level", log_level])
else:
opts, args = pywebsocket._parse_args_and_config(["-p", port,
"-d", doc_root,
"-w", handlers_root,
"--log-level", log_level])
cmd_args = ["-H", host] + cmd_args
opts, cmd_args = pywebsocket._parse_args_and_config(cmd_args)
opts.cgi_directories = []
opts.is_executable_method = None
self.server = pywebsocket.WebSocketServer(opts)
Expand Down

0 comments on commit 110665f

Please sign in to comment.