)]}'
{"ironic_python_agent/extensions/iscsi.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2e2a3d31f38030b9192be755eb17f643da861d1c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(e)"},{"line_number":45,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5d1b0e80","line":44,"updated":"2017-09-07 13:48:46.000000000","message":"I\u0027m not sure it\u0027s a hard error, but generally it\u0027s not recommended to pass a non-string here. Maybe\n\n LOG.error(\"OS error: %s\", e)\n\n?","commit_id":"72bd47653961a5d158174ea3e8d0a5646d299b41"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4d01c79594cb9241ecc41351e799fb21e666daba","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(e)"},{"line_number":45,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5601a869","line":44,"in_reply_to":"7f287b81_5d1b0e80","updated":"2017-09-07 16:33:11.000000000","message":"I did a little more reading. Apparently it may or may not be an object.  I guess re-casting is best in that case, and we can just let it spit out what it has.","commit_id":"72bd47653961a5d158174ea3e8d0a5646d299b41"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"c8f9d170c9cf317159ebfa036530000c24f4ab4b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"OS Error: %s\", e)"},{"line_number":45,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_fafbc4ba","line":44,"updated":"2017-09-08 10:46:34.000000000","message":"I think we still need to log error_msg","commit_id":"48b39bc6a5b2e99b212eabf009bc632180375d77"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"70d8ec22cabc3909d76a827894208b7639b6c7c6","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"OS Error: %s\", e)"},{"line_number":45,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_444aa227","line":44,"in_reply_to":"7f287b81_fafbc4ba","updated":"2017-09-09 18:05:33.000000000","message":"I sense it would be a duplication of data, then again error_msg might also contain a slightly more human readable error.","commit_id":"48b39bc6a5b2e99b212eabf009bc632180375d77"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"66aa28553e8ffe219f5b4a02ddd71544e7f45889","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_50338163","line":44,"range":{"start_line":44,"start_character":49,"end_line":44,"end_character":56},"updated":"2017-10-03 20:42:23.000000000","message":"Is it okay that we have `oserror` literal in the interpolation string and `os_error` in the dictionary?\n\nEven if `LOG.error()` does some magic about that, it still reads somewhat confusing to the uninitiated. ;-)","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"01399219aefca9d36bd2e270401e7115c64ba816","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        raise errors.ISCSICommandError(error_msg, e.exit_code,"},{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_083b4ad1","line":44,"range":{"start_line":44,"start_character":49,"end_line":44,"end_character":56},"in_reply_to":"7f515b1d_50338163","updated":"2017-10-06 05:25:28.000000000","message":"Good catch. This is not going to work.","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9f7ef09b86ca6028c5c1eb75585db659121a66d5","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_23f4d95a","line":45,"updated":"2017-09-26 15:08:46.000000000","message":"nit: str() is not needed","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"64a413b49a54acf2fcc1b81e4529fb91d25dc0e1","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_9877893b","line":45,"updated":"2017-10-06 08:17:22.000000000","message":"rIPA is not localized, so I\u0027d not overengineer it :)","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"313bbefbc52608e35b37e030188cadebc96af59a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_88de973b","line":45,"in_reply_to":"7f515b1d_08008eaa","updated":"2017-10-01 17:50:19.000000000","message":"Better is to not use anything. Then, first, python will do the right thing, probably. Second, the call won\u0027t happen if it\u0027s not needed.\n\nCloser to your question, unicode(str) is just as problematic in Python 2 as str(unicode). Both will blow up on non-ascii characters.. And then I have no idea how mixing unicode substitution and str pattern will work too. Just plain \"%s\" % unicode(e) will do a double conversion, it\u0027s equivalent to \"%s\" % str(unicode(e))\n\ntl;dr it\u0027s all broken, let\u0027s burn python 2 with fire..","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a3eac3e16402676667bdb73e80c53bee5ecc5eeb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_8f5488ff","line":45,"in_reply_to":"7f515b1d_23f4d95a","updated":"2017-09-28 16:08:43.000000000","message":"I know, but other people don\u0027t know, and... It will get nitpicked either way. :(","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"66aa28553e8ffe219f5b4a02ddd71544e7f45889","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_509dc108","line":45,"in_reply_to":"7f515b1d_88de973b","updated":"2017-10-03 20:42:23.000000000","message":"It looks that by doing `str(unicode)` you perform unicode string serialization with the ascii codec (default). That might blow up on a non-7bit character.\n\nSo what is the common unicode serialization format of Ironic logs? It feels more consistent to pass pure unicode contents down the logger and configure logger to serialize unicode contents into something. That feels better compared to explicit by-hand unicode serialization performed by the caller.\n\nIf you still want to explicitly serialize into (say) UTF-8 as the most popular serialization form:\n\n    \u0027unicode string\u0027.encode(\u0027str\u0027, \u0027utf-8\u0027)\n\nAlternatively, if you do not expect non-ascii content and are willing to drop offending pieces:\n\n    \u0027unicode string\u0027.encode(\u0027ascii\u0027, \u0027ignore\u0027)","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"77cba36fde2a49c2e18d9f27c0213e6de793fabb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_62eb6f77","line":45,"in_reply_to":"7f515b1d_88de973b","updated":"2017-10-02 14:12:31.000000000","message":"heh, if it is all broken, then why does https://review.openstack.org/#/c/508225 fix that particular issue?","commit_id":"0b47765c9573040045156357297db398590bcd03"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a53f5e3f11b8776a20463169592d2d6c87d7591d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                       e.stdout, e.stderr)"},{"line_number":43,"context_line":"    except OSError as e:"},{"line_number":44,"context_line":"        LOG.error(\"Error: %(error)s: OS Error: %(oserror)s\","},{"line_number":45,"context_line":"                  {\u0027error\u0027: error_msg, \u0027os_error\u0027: str(e)})"},{"line_number":46,"context_line":"        raise errors.ISCSICommandError(e, e.errno, None, None)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_08008eaa","line":45,"in_reply_to":"7f515b1d_8f5488ff","updated":"2017-09-28 18:51:33.000000000","message":"So dumb question. Wouldn\u0027t six.text_type(e) be better, if there are unicode chars in e? Occurred to me cuz of https://review.openstack.org/#/c/508225","commit_id":"0b47765c9573040045156357297db398590bcd03"}],"ironic_python_agent/tests/unit/extensions/test_iscsi.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"163e3ab6aba69eea7062539a5b923e520ad15e12","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                                       mock_destroy):"},{"line_number":140,"context_line":"        mock_dispatch.return_value \u003d self.fake_dev"},{"line_number":141,"context_line":"        mock_execute.side_effect \u003d OSError(\u0027file not found\u0027)"},{"line_number":142,"context_line":"        self.assertRaises(errors.ISCSIError,"},{"line_number":143,"context_line":"                          self.agent_extension.start_iscsi_target,"},{"line_number":144,"context_line":"                          iqn\u003dself.fake_iqn)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_dd5ff00c","line":142,"updated":"2017-09-07 21:18:32.000000000","message":"not error.ISCSICommandError?\n\nI see that ISCSICommandError inherits from ISCSIError.\n\nIs it cuz of L126?","commit_id":"48b39bc6a5b2e99b212eabf009bc632180375d77"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4469f3f4eaff42190e364623fbb1f890cf515e85","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                                       mock_destroy):"},{"line_number":140,"context_line":"        mock_dispatch.return_value \u003d self.fake_dev"},{"line_number":141,"context_line":"        mock_execute.side_effect \u003d OSError(\u0027file not found\u0027)"},{"line_number":142,"context_line":"        self.assertRaises(errors.ISCSIError,"},{"line_number":143,"context_line":"                          self.agent_extension.start_iscsi_target,"},{"line_number":144,"context_line":"                          iqn\u003dself.fake_iqn)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_2470b672","line":142,"in_reply_to":"7f287b81_dd5ff00c","updated":"2017-09-09 18:11:09.000000000","message":"I don\u0027t think so, If memory serves ISCSICommandError is based on ISCSIError, and ISCSICommandError has fields that it expects that are exclusive to the oslo_utils specific exceptions.","commit_id":"48b39bc6a5b2e99b212eabf009bc632180375d77"}]}
