)]}'
{"oslo_log/log.py":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"90ae787b1d5b1b0ef3e118ed09c3ea39aa526928","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def _load_log_config(log_config_append):"},{"line_number":216,"context_line":"    yaml_suffixes \u003d (\u0027.yaml\u0027, \u0027.yml\u0027)"},{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_23b3bc51","line":216,"range":{"start_line":216,"start_character":35,"end_line":216,"end_character":37},"updated":"2015-12-21 10:55:52.000000000","message":"Hmm,\n\nI think we shouldn\u0027t hard code the suffix here without any document.\n\nAnother solution : provide new config option to tell what type of file we are passing ?\n\nor just try with INI format, if get ParseError , then try yaml ?","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a6843d3a4b86d766cedb3b436947e9267877d991","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def _load_log_config(log_config_append):"},{"line_number":216,"context_line":"    yaml_suffixes \u003d (\u0027.yaml\u0027, \u0027.yml\u0027)"},{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_46032710","line":216,"range":{"start_line":216,"start_character":35,"end_line":216,"end_character":37},"in_reply_to":"1a7b0d38_a5ea7baa","updated":"2016-01-27 13:20:01.000000000","message":"Would method doc on #setup (L248) be OK? It\u0027s ref\u0027d by doc/source/usage.rst:31.","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6189c864bee23fdd9f77ffa7b09f72cc0f9a705c","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def _load_log_config(log_config_append):"},{"line_number":216,"context_line":"    yaml_suffixes \u003d (\u0027.yaml\u0027, \u0027.yml\u0027)"},{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_a5ea7baa","line":216,"range":{"start_line":216,"start_character":35,"end_line":216,"end_character":37},"in_reply_to":"3a7e1126_23b3bc51","updated":"2015-12-28 15:52:31.000000000","message":"We definitely need to document the behavior somewhere.","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6189c864bee23fdd9f77ffa7b09f72cc0f9a705c","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"},{"line_number":220,"context_line":"                logging.config.dictConfig(yaml.load(yaml_config))"},{"line_number":221,"context_line":"        except (yaml.parser.ParserError, ValueError, IOError) as exc:"},{"line_number":222,"context_line":"            raise LogConfigError(log_config_append, six.text_type(exc))"},{"line_number":223,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_65ca5350","line":220,"updated":"2015-12-28 15:52:31.000000000","message":"For reading INI files we use disable_existing_loggers\u003dFalse. Is there an equivalent for dictConfig()?","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a6843d3a4b86d766cedb3b436947e9267877d991","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"},{"line_number":220,"context_line":"                logging.config.dictConfig(yaml.load(yaml_config))"},{"line_number":221,"context_line":"        except (yaml.parser.ParserError, ValueError, IOError) as exc:"},{"line_number":222,"context_line":"            raise LogConfigError(log_config_append, six.text_type(exc))"},{"line_number":223,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_26db8b1d","line":220,"in_reply_to":"1a7b0d38_65ca5350","updated":"2016-01-27 13:20:01.000000000","message":"python2.7/logging/config.py:538 says if you put \u0027disable_existing_loggers\u0027 in the config as False, you get this effect. It defaults True so we should add it here (as False) unless it\u0027s already present.","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6189c864bee23fdd9f77ffa7b09f72cc0f9a705c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"},{"line_number":220,"context_line":"                logging.config.dictConfig(yaml.load(yaml_config))"},{"line_number":221,"context_line":"        except (yaml.parser.ParserError, ValueError, IOError) as exc:"},{"line_number":222,"context_line":"            raise LogConfigError(log_config_append, six.text_type(exc))"},{"line_number":223,"context_line":"    else:"},{"line_number":224,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_45cdd764","line":221,"updated":"2015-12-28 15:52:31.000000000","message":"Catching all of these exceptions together on one line makes it hard to see where they\u0027re expected to come from. The YAML parser error is clear, but what might trigger a ValueError? Is that from the parser or from dictConfig()?","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"a6843d3a4b86d766cedb3b436947e9267877d991","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"},{"line_number":220,"context_line":"                logging.config.dictConfig(yaml.load(yaml_config))"},{"line_number":221,"context_line":"        except (yaml.parser.ParserError, ValueError, IOError) as exc:"},{"line_number":222,"context_line":"            raise LogConfigError(log_config_append, six.text_type(exc))"},{"line_number":223,"context_line":"    else:"},{"line_number":224,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_469007ed","line":221,"in_reply_to":"1a7b0d38_45cdd764","updated":"2016-01-27 13:20:01.000000000","message":"ParserError is one except. Pydoc says dictConfig can raise ValueError, TypeError, AttributeError or ImportError. We should reraise all those in another except. Presumably IOError is open() saying it can\u0027t read the file, we can reraise that in another except.","commit_id":"7c18ac20a54733d03cce07818c37943cfc5247d3"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"907588bf3d00db6fc788bc8332cffd3905a64702","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    if log_config_append.endswith(yaml_suffixes):"},{"line_number":218,"context_line":"        try:"},{"line_number":219,"context_line":"            with open(log_config_append, \u0027r\u0027) as yaml_config:"},{"line_number":220,"context_line":"                conf_dict \u003d yaml.load(yaml_config)"},{"line_number":221,"context_line":"                # logging.config defaults this True but we want it False if"},{"line_number":222,"context_line":"                # unspecified"},{"line_number":223,"context_line":"                if \u0027disable_existing_loggers\u0027 not in conf_dict:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_a8b48534","line":220,"range":{"start_line":220,"start_character":33,"end_line":220,"end_character":37},"updated":"2016-01-31 01:23:49.000000000","message":"Please use safe_load, load is vulnerable to python code execution.","commit_id":"b387c55ff263c6eef7be07e2919c1f8bc4676ef5"}]}
