)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58566b01a705dfe75fa2dc998032b1b1b1d923ba","unresolved":false,"context_lines":[{"line_number":18,"context_line":"earlier, for an unused base file, because of one of these preceding"},{"line_number":19,"context_line":"utime calls having failed."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Note: this relates to https://bugs.launchpad.net/nova/+bug/1809123 and"},{"line_number":22,"context_line":"is a possible alternate fix to https://review.openstack.org/#/c/625741/."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Idc131ff426f1707150867030fa5a69b77a7fc832"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_04f035c9","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":72},"updated":"2019-03-06 14:42:19.000000000","message":"Just replace this with:\n\nCloses-Bug: #1809123","commit_id":"bb7d3f1e2a43cbb85ffe44ed0f005e7bb600f5e1"}],"nova/tests/unit/virt/libvirt/test_imagebackend.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9aa951c358a47a4a197c37be798fb284cf5c694c","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"        e.strerror \u003d \"IO Error\""},{"line_number":1879,"context_line":"        self.mock_utime.side_effect \u003d e"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"        # self.assertRaises() only allows you to assert the class of the error,"},{"line_number":1882,"context_line":"        # not its properties."},{"line_number":1883,"context_line":"        try:"},{"line_number":1884,"context_line":"            imagebackend._update_utime_ignore_eacces(mock.sentinel.path)"},{"line_number":1885,"context_line":"        except Exception as raised:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_32046f15","line":1882,"range":{"start_line":1881,"start_character":0,"end_line":1882,"end_character":29},"updated":"2019-03-07 21:23:55.000000000","message":"You can do this by using assertRaises() as a context manager:\n\n with self.assertRaises(...) as cm:\n     self.assertIs(e, cm.exception)","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"7b520b63daa5eebe6623ab48f20143e352b8db0b","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"        e.strerror \u003d \"IO Error\""},{"line_number":1879,"context_line":"        self.mock_utime.side_effect \u003d e"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"        # self.assertRaises() only allows you to assert the class of the error,"},{"line_number":1882,"context_line":"        # not its properties."},{"line_number":1883,"context_line":"        try:"},{"line_number":1884,"context_line":"            imagebackend._update_utime_ignore_eacces(mock.sentinel.path)"},{"line_number":1885,"context_line":"        except Exception as raised:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_8e12d208","line":1882,"range":{"start_line":1881,"start_character":0,"end_line":1882,"end_character":29},"in_reply_to":"5fc1f717_32046f15","updated":"2019-03-08 09:01:52.000000000","message":"That\u0027s what the docs said, but it wasn\u0027t working for me and I didn\u0027t bother to investigate. Looked like it might have been py31+, though. Could that be related?","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6479ae06808e177cb8b68d50e689b92c50304a4a","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"        e.strerror \u003d \"IO Error\""},{"line_number":1879,"context_line":"        self.mock_utime.side_effect \u003d e"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"        # self.assertRaises() only allows you to assert the class of the error,"},{"line_number":1882,"context_line":"        # not its properties."},{"line_number":1883,"context_line":"        try:"},{"line_number":1884,"context_line":"            imagebackend._update_utime_ignore_eacces(mock.sentinel.path)"},{"line_number":1885,"context_line":"        except Exception as raised:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_726e2e30","line":1882,"range":{"start_line":1881,"start_character":0,"end_line":1882,"end_character":29},"in_reply_to":"5fc1f717_8e12d208","updated":"2019-03-12 14:17:00.000000000","message":"\u003e That\u0027s what the docs said, but it wasn\u0027t working for me and I\n \u003e didn\u0027t bother to investigate. Looked like it might have been py31+,\n \u003e though. Could that be related?\n\nhttps://docs.python.org/3.5/library/unittest.html#unittest.TestCase.assertRaises\n\n\"Changed in version 3.2: Added the exception attribute.\"\n\nAre you testing with py31? You should be using py27 and probably at least py35 if not py36 by now.","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"45c2f98758678e494ac3104ed3869aa10d97677e","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"        e.strerror \u003d \"IO Error\""},{"line_number":1879,"context_line":"        self.mock_utime.side_effect \u003d e"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"        # self.assertRaises() only allows you to assert the class of the error,"},{"line_number":1882,"context_line":"        # not its properties."},{"line_number":1883,"context_line":"        try:"},{"line_number":1884,"context_line":"            imagebackend._update_utime_ignore_eacces(mock.sentinel.path)"},{"line_number":1885,"context_line":"        except Exception as raised:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_020313ba","line":1882,"range":{"start_line":1881,"start_character":0,"end_line":1882,"end_character":29},"in_reply_to":"5fc1f717_8e12d208","updated":"2019-03-08 14:01:45.000000000","message":"I thought it was one of those things we had brought into our test class hierarchy (like assert_called_once(), which we backported into mock-the-lib since it wasn\u0027t in base mock until py36 or something). Possible it\u0027s in a base test class that\u0027s not being pulled in here. I\u0027ll look closer in a bit. Meanwhile, not holding up for this.\n\nDid you try assigning the result too?\n\n ex \u003d self.assertRaises(...)","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"52cd47ceb47a7bb879f062a87e055b0aadc021e3","unresolved":false,"context_lines":[{"line_number":1881,"context_line":"        ex \u003d self.assertRaises("},{"line_number":1882,"context_line":"            OSError, imagebackend._update_utime_ignore_eacces,"},{"line_number":1883,"context_line":"            mock.sentinel.path)"},{"line_number":1884,"context_line":"        self.assertIs(ex, e)"},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        self.mock_utime.assert_called_once_with(mock.sentinel.path)"},{"line_number":1887,"context_line":"        self.assertNotIn(self.ERROR_STUB, self.stdlog.logger.output)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5fc1f717_e6481f88","line":1884,"updated":"2019-03-12 15:12:11.000000000","message":"++","commit_id":"362bba9011f8445285c3f72a0b00630163bfbc2f"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef2d2025889924085484eb5026a8bcb8617b13b3","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        nova.privsep.path.utime(path)"},{"line_number":73,"context_line":"    except OSError as e:"},{"line_number":74,"context_line":"        if e.errno \u003d\u003d errno.EACCES:"},{"line_number":75,"context_line":"            LOG.warning(\"Ignoring failure to update utime of %(path)s: \""},{"line_number":76,"context_line":"                        \"%(error)s\", {\u0027path\u0027: path, \u0027error\u0027: e})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            raise"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_f2b9becb","line":78,"range":{"start_line":74,"start_character":8,"end_line":78,"end_character":17},"updated":"2019-03-12 14:13:26.000000000","message":"Slight nit here, we could use oslo\u0027s excutils.save_and_reraise_exception here and set the context\u0027s reraise flag to False if we get EACCESS, then we don\u0027t have to raise explicitly.","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"52cd47ceb47a7bb879f062a87e055b0aadc021e3","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        nova.privsep.path.utime(path)"},{"line_number":73,"context_line":"    except OSError as e:"},{"line_number":74,"context_line":"        if e.errno \u003d\u003d errno.EACCES:"},{"line_number":75,"context_line":"            LOG.warning(\"Ignoring failure to update utime of %(path)s: \""},{"line_number":76,"context_line":"                        \"%(error)s\", {\u0027path\u0027: path, \u0027error\u0027: e})"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            raise"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_092a1c7e","line":78,"range":{"start_line":74,"start_character":8,"end_line":78,"end_character":17},"in_reply_to":"5fc1f717_f2b9becb","updated":"2019-03-12 15:12:11.000000000","message":"Not a big gain on this change. You could have instead saved a whole line with:\n\n if e.errno !\u003d errno.EACCES:\n     raise\n LOG.warning(...)\n\nsave_and_reraise is generally safer, but in this case only if, like, e.errno or errno.EACCES is a @property that could clear exception context.\n\nBut whatever.","commit_id":"b58c0a775375ac8a3180ed2444d2fe066226731b"}]}
