facebook/tornado — pull request #499 by mckoss (2012-04-26 01:07:00+00:00)
Title: parse_command_line should be idempotent - remove side effects

I had a problem with parse_command_line - it could not be called twice without doubling up the logging setup by the pretty logging.

(the reason I need to call it twice is that the directory for reading the conf file, can be an option on the command line, yet options in the conf file, can be over-ridden by the command line. So I call in this order:

parse_command_line()
parse_config_file(os.path.join(options.data_dir, options.conf_file))
parse_command_line()