)]}'
{"ironic/drivers/modules/console_utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8f2b866e6721a59f6bb863bb7437f93a310b8727","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    return pid_dir"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _console_pid_dir_exists():"},{"line_number":72,"context_line":"    \"\"\"Ensure that the console PID directory exists"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    Checks that the directory for the console PID file exists"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_4a4b55b0","line":71,"updated":"2014-08-14 08:03:26.000000000","message":"I would call it  _ensure_console_pid_dir_exists. Otherwise it looks like something returning boolean :)","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1f8d60a0cab25c7881a577f2bc4c90aefacd844b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    return pid_dir"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _console_pid_dir_exists():"},{"line_number":72,"context_line":"    \"\"\"Ensure that the console PID directory exists"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    Checks that the directory for the console PID file exists"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_9835c748","line":71,"in_reply_to":"7ac7a964_4a4b55b0","updated":"2014-08-14 08:57:13.000000000","message":"+1","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d986bea2b7637d5b9b5468e6476bfb14fd0451e5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    return pid_dir"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def _console_pid_dir_exists():"},{"line_number":72,"context_line":"    \"\"\"Ensure that the console PID directory exists"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    Checks that the directory for the console PID file exists"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_c0d3b636","line":71,"in_reply_to":"7ac7a964_9835c748","updated":"2014-08-14 13:49:20.000000000","message":"Sure.","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8f2b866e6721a59f6bb863bb7437f93a310b8727","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    except exception.NoConsolePid:"},{"line_number":173,"context_line":"        pass"},{"line_number":174,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":175,"context_line":"        LOG.warning(_(\"Failed to kill the old console process \""},{"line_number":176,"context_line":"                \"before starting a new shellinabox console \""},{"line_number":177,"context_line":"                \"for node %(node)s. Reason: %(err)s\"),"},{"line_number":178,"context_line":"                {\u0027node\u0027: node_uuid, \u0027err\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_8a656d47","line":175,"updated":"2014-08-14 08:03:26.000000000","message":"nit: _LW","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"1f8d60a0cab25c7881a577f2bc4c90aefacd844b","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                {\u0027node\u0027: node_uuid, \u0027err\u0027: exc})"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    # the directory for the pid file must exist"},{"line_number":181,"context_line":"    _console_pid_dir_exists()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    pid_file \u003d _get_console_pid_file(node_uuid)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_7830eb56","line":181,"updated":"2014-08-14 08:57:13.000000000","message":"I like breaking functions into atomic parts, but now testing whether the dir exists is a separate call from _get_console_pid_file() I think it\u0027s less convenient because we have to make two calls to ensure something that before only needed one call ( _get_console_pid_file() ) .\n\nCan we make _get_console_pid_file() call _console_pid_dir_exists() implicitly? I think it\u0027s logical to expect that by getting the PID file the dir that holds that files actually exists","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d986bea2b7637d5b9b5468e6476bfb14fd0451e5","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                {\u0027node\u0027: node_uuid, \u0027err\u0027: exc})"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    # the directory for the pid file must exist"},{"line_number":181,"context_line":"    _console_pid_dir_exists()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    pid_file \u003d _get_console_pid_file(node_uuid)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_e03192a3","line":181,"in_reply_to":"7ac7a964_7830eb56","updated":"2014-08-14 13:49:20.000000000","message":"The reason why I split up _get_console_pid_dir_exists() from _get_console_pid_file() is that otherwise _get_console_pid_file() would possibly raise ConsoleError and anything that called it would have to handle it. It really only needs to exist here, so that shellinaboxd can add the pid file. \n\nI did a version that had a Boolean in _get_console_pid_file(uuid, make_dir\u003dTrue) but I actually think this is cleaner/easier to understand. Let\u0027s discuss.","commit_id":"2753c1326098af5f9f7e69d52ce2cbd875dde46a"}]}
