Steps before log setup should be outside try-except

If the steps before the log setup are inside the try-except and they fail, the
error will not be visible since the log system hasn't been set up yet. It is
better to not catch the exception so that the error will be visible.
This commit is contained in:
Stein Magnus Jodal 2012-09-19 23:51:31 +02:00
parent 0c9966197b
commit 402e3043f6

View File

@ -46,8 +46,8 @@ logger = logging.getLogger('mopidy.main')
def main():
signal.signal(signal.SIGTERM, exit_handler)
loop = gobject.MainLoop()
options = parse_options()
try:
options = parse_options()
setup_logging(options.verbosity_level, options.save_debug_log)
check_old_folders()
setup_settings(options.interactive)