)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f8a177363a66986437f6465af6642e700ed23bf0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"appended a string to it, which causes the TypeError to be raised."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Fix it by using string formatting instead of \u0027+\u0027 to force it"},{"line_number":14,"context_line":"to convert to string before concatenating."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: 1421652"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_70d936f4","line":14,"updated":"2015-08-13 18:27:58.000000000","message":"according to the bug report, this is python 2.6 specific? should that be included in the commit message?","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"35e15911054e2cf79380905926ad57143b3f2158","unresolved":false,"context_lines":[{"line_number":11,"context_line":"appended a string to it, which causes the TypeError to be raised."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Fix it by using string formatting instead of \u0027+\u0027 to force it"},{"line_number":14,"context_line":"to convert to string before concatenating."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: 1421652"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_9b440cb8","line":14,"in_reply_to":"1a4dcd0f_70d936f4","updated":"2015-08-14 07:24:40.000000000","message":"I was able to reproduce this problem with Python 2.7 as well, so I guess it\u0027s not 2.6 specific.","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"}],"keystoneclient/common/cms.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"2f8baa4429ea17809023d93f2bba8a525c8b4faa","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        retcode, err \u003d _check_files_accessible(files)"},{"line_number":110,"context_line":"        if process.stderr:"},{"line_number":111,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":112,"context_line":"            err \u003d err + msg.decode(\u0027utf-8\u0027)"},{"line_number":113,"context_line":"        output \u003d \u0027\u0027"},{"line_number":114,"context_line":"    else:"},{"line_number":115,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_8d269ccc","side":"PARENT","line":112,"updated":"2015-02-19 07:45:08.000000000","message":"can you try if this works:\n\nerr \u003d  \"%s %s\" % (err, msg.decode(\u0027utf-8\u0027))\n\nThis will force err to convert to string first before concatenating","commit_id":"ae784225627f1652638edc0bf273a41519a438d5"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"342fa1586de90d95bfb569fb3855909aa641aea8","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        retcode, err \u003d _check_files_accessible(files)"},{"line_number":110,"context_line":"        if process.stderr:"},{"line_number":111,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":112,"context_line":"            err \u003d err + msg.decode(\u0027utf-8\u0027)"},{"line_number":113,"context_line":"        output \u003d \u0027\u0027"},{"line_number":114,"context_line":"    else:"},{"line_number":115,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_44ede6ee","side":"PARENT","line":112,"in_reply_to":"da86d52c_8d269ccc","updated":"2015-02-23 00:24:48.000000000","message":"+1","commit_id":"ae784225627f1652638edc0bf273a41519a438d5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4745b0afefb76f2d360ef8200c6005ebd8c1a834","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # able to read an input file, so check ourselves if can\u0027t read a file."},{"line_number":109,"context_line":"        retcode, err \u003d _check_files_accessible(files)"},{"line_number":110,"context_line":"        if err is None:"},{"line_number":111,"context_line":"            err \u003d process.stderr.read().decode(\u0027utf-8\u0027)"},{"line_number":112,"context_line":"        output \u003d \u0027\u0027"},{"line_number":113,"context_line":"    else:"},{"line_number":114,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_e4ddfa71","line":111,"updated":"2015-02-23 00:48:00.000000000","message":"should be able to append the message with _(\u0027%(err)s%(stderr)s\u0027) % {\u0027err\u0027: err, \u0027stderr\u0027: process.stderr.read().decode(\u0027utf-8\u0027)}","commit_id":"bf8eac535b3b44a0f73f8181936ff5f0019fde2d"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"5216e6b7b67a002204efd8e9508365078b8cbae2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # able to read an input file, so check ourselves if can\u0027t read a file."},{"line_number":109,"context_line":"        retcode, err \u003d _check_files_accessible(files)"},{"line_number":110,"context_line":"        if err is None:"},{"line_number":111,"context_line":"            err \u003d process.stderr.read().decode(\u0027utf-8\u0027)"},{"line_number":112,"context_line":"        output \u003d \u0027\u0027"},{"line_number":113,"context_line":"    else:"},{"line_number":114,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_839fc302","line":111,"in_reply_to":"ba7be1f8_87c9727a","updated":"2015-03-30 22:39:31.000000000","message":"I don\u0027t like this change because the behavior is different. In the new change you either get the error or the stderr and not both (as it was previously).","commit_id":"bf8eac535b3b44a0f73f8181936ff5f0019fde2d"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"93c311d45a2e95ff4c0e4ee0501b21818b795f97","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # able to read an input file, so check ourselves if can\u0027t read a file."},{"line_number":109,"context_line":"        retcode, err \u003d _check_files_accessible(files)"},{"line_number":110,"context_line":"        if err is None:"},{"line_number":111,"context_line":"            err \u003d process.stderr.read().decode(\u0027utf-8\u0027)"},{"line_number":112,"context_line":"        output \u003d \u0027\u0027"},{"line_number":113,"context_line":"    else:"},{"line_number":114,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba7be1f8_87c9727a","line":111,"in_reply_to":"ba7be1f8_e4ddfa71","updated":"2015-02-24 05:04:51.000000000","message":"the _() is not needed, we don\u0027t need to mark it as translatable as everything will be substituted anyway.\n\nit is pretty much the same suggestion on left side. :)","commit_id":"bf8eac535b3b44a0f73f8181936ff5f0019fde2d"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f41d5c06c477e2a73dc1f6f8b2fe0772a69c39eb","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":114,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":115,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":116,"context_line":"            err \u003d \"%s%s\" % (err, msg)"},{"line_number":117,"context_line":"        output \u003d \u0027\u0027"},{"line_number":118,"context_line":"    else:"},{"line_number":119,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_18fd7408","line":116,"updated":"2015-08-13 20:15:34.000000000","message":"This won\u0027t correctly do the translation anyway will it? I think it will just return the message test and not do a translation.","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"35e15911054e2cf79380905926ad57143b3f2158","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":114,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":115,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":116,"context_line":"            err \u003d \"%s%s\" % (err, msg)"},{"line_number":117,"context_line":"        output \u003d \u0027\u0027"},{"line_number":118,"context_line":"    else:"},{"line_number":119,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_5fb3cfe9","line":116,"in_reply_to":"1a4dcd0f_18fd7408","updated":"2015-08-14 07:24:40.000000000","message":"Here the translated string is err, it contains an error message from \u0027_check_files_accessible\u0027 and I think we\u0027d get a translated message at this point. Later we append the stderr output to the previously translated string, stderr output is not translated for obvious reasons. At least that\u0027s how I see it.","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"cf44b5341b63a09e78eba08d8b26db4d6c07e1ad","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":114,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":115,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":116,"context_line":"            err \u003d \"%s%s\" % (err, msg)"},{"line_number":117,"context_line":"        output \u003d \u0027\u0027"},{"line_number":118,"context_line":"    else:"},{"line_number":119,"context_line":"        retcode \u003d process.poll()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_f9a09744","line":116,"in_reply_to":"1a4dcd0f_5fb3cfe9","updated":"2015-08-14 19:11:46.000000000","message":"The way I read the code here: http://git.openstack.org/cgit/openstack/oslo.i18n/tree/oslo_i18n/_message.py is that is you turn a Message into a string you will only get the English msgtext which is passed into the parent constructor (unicode in 2.6 and 2.7). Now I haven\u0027t tried this, I\u0027ve only walked through the code. Are you able to create a test that proves this gives you a translated message?","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"3cca763a7e559cdc38a97f77bd14fede5885fa9d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":113,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":114,"context_line":"            if err:"},{"line_number":115,"context_line":"                err \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror():\u0027"},{"line_number":116,"context_line":"                        \u0027 %(stderr)s\\nLikely due to %(file)s: %(error)s\u0027) % \\"},{"line_number":117,"context_line":"                    {\u0027stderr\u0027: msg,"},{"line_number":118,"context_line":"                     \u0027file\u0027: err[0],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_9eacd48d","line":115,"updated":"2015-09-09 18:41:58.000000000","message":"I recommend put the white space in the end of the line, not in the begin, you can see a exapmle, in line 366.","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"570de85ea6c80d08e3e9f3cd10f5477bb435a477","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":113,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":114,"context_line":"            if err:"},{"line_number":115,"context_line":"                err \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror():\u0027"},{"line_number":116,"context_line":"                        \u0027 %(stderr)s\\nLikely due to %(file)s: %(error)s\u0027) % \\"},{"line_number":117,"context_line":"                    {\u0027stderr\u0027: msg,"},{"line_number":118,"context_line":"                     \u0027file\u0027: err[0],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_c301153b","line":115,"updated":"2015-09-09 18:24:22.000000000","message":"I suggest putting the string between () instead of using the  \\, much more used in keystone","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"7726e650022cced77bfbd12de7f4b7ed3dfa6515","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            if isinstance(msg, six.binary_type):"},{"line_number":113,"context_line":"                msg \u003d msg.decode(\u0027utf-8\u0027)"},{"line_number":114,"context_line":"            if err:"},{"line_number":115,"context_line":"                err \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror():\u0027"},{"line_number":116,"context_line":"                        \u0027 %(stderr)s\\nLikely due to %(file)s: %(error)s\u0027) % \\"},{"line_number":117,"context_line":"                    {\u0027stderr\u0027: msg,"},{"line_number":118,"context_line":"                     \u0027file\u0027: err[0],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_19e69ee8","line":115,"in_reply_to":"da20952f_9eacd48d","updated":"2015-09-09 19:00:58.000000000","message":"Done","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"3cca763a7e559cdc38a97f77bd14fede5885fa9d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                     \u0027error\u0027: err[1]}"},{"line_number":120,"context_line":"            else:"},{"line_number":121,"context_line":"                err \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror():\u0027"},{"line_number":122,"context_line":"                        \u0027 %(stderr)s\u0027) % {\u0027stderr\u0027: msg}"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        output \u003d \u0027\u0027"},{"line_number":125,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_beec38bc","line":122,"updated":"2015-09-09 18:41:58.000000000","message":"when you have only one argument you don\u0027t need use { } you can just make\n\nerr \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror(): %s \u0027) % msg","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"7726e650022cced77bfbd12de7f4b7ed3dfa6515","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                     \u0027error\u0027: err[1]}"},{"line_number":120,"context_line":"            else:"},{"line_number":121,"context_line":"                err \u003d _(\u0027Hit OSError in _process_communicate_handle_oserror():\u0027"},{"line_number":122,"context_line":"                        \u0027 %(stderr)s\u0027) % {\u0027stderr\u0027: msg}"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        output \u003d \u0027\u0027"},{"line_number":125,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_f9cbaa48","line":122,"in_reply_to":"da20952f_beec38bc","updated":"2015-09-09 19:00:58.000000000","message":"Done","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"16cd005dd87f947227de16cb7ed4c24ea94f8d1e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    except IOError as e:"},{"line_number":86,"context_line":"        # Catching IOError means there is an issue with"},{"line_number":87,"context_line":"        # the given file."},{"line_number":88,"context_line":"        err \u003d try_file, e.strerror"},{"line_number":89,"context_line":"        # Emulate openssl behavior, which returns with code 2 when"},{"line_number":90,"context_line":"        # access to a file failed."},{"line_number":91,"context_line":"        retcode \u003d OpensslCmsExitStatus.INPUT_FILE_READ_ERROR"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_e3bafd22","line":88,"updated":"2015-09-15 19:35:46.000000000","message":"returning a dict would make the code easier to follow.","commit_id":"3e7f80608025166c35bcf97c630c0578e798b796"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"16cd005dd87f947227de16cb7ed4c24ea94f8d1e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    else:"},{"line_number":127,"context_line":"        retcode \u003d process.poll()"},{"line_number":128,"context_line":"        if err is not None:"},{"line_number":129,"context_line":"            if isinstance(err, six.binary_type):"},{"line_number":130,"context_line":"                err \u003d err.decode(\u0027utf-8\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return output, err, retcode"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_4348892d","line":129,"updated":"2015-09-15 19:35:46.000000000","message":"err isn\u0027t a string here, it\u0027s a tuple, so this doesn\u0027t make any sense.","commit_id":"3e7f80608025166c35bcf97c630c0578e798b796"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a711b31a021c402e316c953a10d69d70e2315898","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    else:"},{"line_number":127,"context_line":"        retcode \u003d process.poll()"},{"line_number":128,"context_line":"        if err is not None:"},{"line_number":129,"context_line":"            if isinstance(err, six.binary_type):"},{"line_number":130,"context_line":"                err \u003d err.decode(\u0027utf-8\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return output, err, retcode"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_c33019a1","line":129,"in_reply_to":"ba15a1d1_4348892d","updated":"2015-09-15 19:39:10.000000000","message":"oh, no it\u0027s a string.","commit_id":"3e7f80608025166c35bcf97c630c0578e798b796"}],"keystoneclient/tests/unit/test_cms.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f41d5c06c477e2a73dc1f6f8b2fe0772a69c39eb","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import subprocess"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import oslo_i18n"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"import testresources"},{"line_number":21,"context_line":"from testtools import matchers"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_5db9ae14","line":18,"updated":"2015-08-13 20:15:34.000000000","message":"no newline here","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"35e15911054e2cf79380905926ad57143b3f2158","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import subprocess"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import oslo_i18n"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"import testresources"},{"line_number":21,"context_line":"from testtools import matchers"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_5f018f69","line":18,"in_reply_to":"1a4dcd0f_5db9ae14","updated":"2015-08-14 07:24:40.000000000","message":"Done","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f8a177363a66986437f6465af6642e700ed23bf0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self.assertThat(token_id, matchers.HasLength(64))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @mock.patch(\u0027keystoneclient.common.cms._check_files_accessible\u0027)"},{"line_number":162,"context_line":"    def test__process_communicate_handle_oserror_epipe(self, files_acc_mock):"},{"line_number":163,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":164,"context_line":"        process_mock.communicate \u003d self._raise_OSError"},{"line_number":165,"context_line":"        process_mock.stderr \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_90688223","line":162,"updated":"2015-08-13 18:27:58.000000000","message":"please remove one of the underscores after \u0027test\u0027; \n\n    test_process_ \n\ninstead of \n\n    test__process","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"35e15911054e2cf79380905926ad57143b3f2158","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self.assertThat(token_id, matchers.HasLength(64))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @mock.patch(\u0027keystoneclient.common.cms._check_files_accessible\u0027)"},{"line_number":162,"context_line":"    def test__process_communicate_handle_oserror_epipe(self, files_acc_mock):"},{"line_number":163,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":164,"context_line":"        process_mock.communicate \u003d self._raise_OSError"},{"line_number":165,"context_line":"        process_mock.stderr \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_dfed9fb8","line":162,"in_reply_to":"1a4dcd0f_90688223","updated":"2015-08-14 07:24:40.000000000","message":"Done","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f8a177363a66986437f6465af6642e700ed23bf0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        self.assertIn(\u0027err\u0027, err)"},{"line_number":173,"context_line":"        self.assertIn(\u0027proc stderr\u0027, err)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test__process_communicate_handle_oserror_no_exception(self):"},{"line_number":176,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":177,"context_line":"        process_mock.communicate.return_value \u003d \u0027out\u0027, \u0027err\u0027"},{"line_number":178,"context_line":"        process_mock.poll.return_value \u003d 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_5072fa12","line":175,"updated":"2015-08-13 18:27:58.000000000","message":"same comment here.","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"35e15911054e2cf79380905926ad57143b3f2158","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        self.assertIn(\u0027err\u0027, err)"},{"line_number":173,"context_line":"        self.assertIn(\u0027proc stderr\u0027, err)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test__process_communicate_handle_oserror_no_exception(self):"},{"line_number":176,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":177,"context_line":"        process_mock.communicate.return_value \u003d \u0027out\u0027, \u0027err\u0027"},{"line_number":178,"context_line":"        process_mock.poll.return_value \u003d 0"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_7f29ebf1","line":175,"in_reply_to":"1a4dcd0f_5072fa12","updated":"2015-08-14 07:24:40.000000000","message":"Done","commit_id":"2770a7dde7dcbd02ae3769b91ebebb56d7c0bf99"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"570de85ea6c80d08e3e9f3cd10f5477bb435a477","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            raise Exception(\u0027Your version of OpenSSL is not supported. \u0027"},{"line_number":43,"context_line":"                            \u0027You will need to update it to 1.0 or later.\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _raise_OSError(*args):"},{"line_number":46,"context_line":"        e \u003d OSError()"},{"line_number":47,"context_line":"        e.errno \u003d errno.EPIPE"},{"line_number":48,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_5e739cb4","line":45,"updated":"2015-09-09 18:24:22.000000000","message":"this doesn\u0027t seem related to the patch","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"aa6ff6dcf2eb4f80a6c6d356b0d1012218f7c2c4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            raise Exception(\u0027Your version of OpenSSL is not supported. \u0027"},{"line_number":43,"context_line":"                            \u0027You will need to update it to 1.0 or later.\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _raise_OSError(*args):"},{"line_number":46,"context_line":"        e \u003d OSError()"},{"line_number":47,"context_line":"        e.errno \u003d errno.EPIPE"},{"line_number":48,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_be1af8c4","line":45,"in_reply_to":"da20952f_5e739cb4","updated":"2015-09-09 18:39:33.000000000","message":"It is related. Originally it was inlined into the test_cms_verify_token_no_oserror test. I needed the similar behavior for mocking Popen.communicate, so I extracted it into a method and re-used in the new tests (to avoid copy/paste).","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"3cca763a7e559cdc38a97f77bd14fede5885fa9d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            raise Exception(\u0027Your version of OpenSSL is not supported. \u0027"},{"line_number":43,"context_line":"                            \u0027You will need to update it to 1.0 or later.\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _raise_OSError(*args):"},{"line_number":46,"context_line":"        e \u003d OSError()"},{"line_number":47,"context_line":"        e.errno \u003d errno.EPIPE"},{"line_number":48,"context_line":"        raise e"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_be43d8ae","line":45,"in_reply_to":"da20952f_5e739cb4","updated":"2015-09-09 18:41:58.000000000","message":"It is, you can see in the lines 162 and 178","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"3cca763a7e559cdc38a97f77bd14fede5885fa9d","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self.assertEqual((output, retcode), (\u0027\u0027, -1))"},{"line_number":186,"context_line":"        self.assertIn(\u0027proc stderr\u0027, err)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def test_process_communicate_handle_oserror_no_exception(self):"},{"line_number":189,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":190,"context_line":"        process_mock.communicate.return_value \u003d \u0027out\u0027, \u0027err\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_be48b8b4","line":187,"updated":"2015-09-09 18:41:58.000000000","message":"why you don\u0027t use mock in this method too, since you will have the same call?\n\n\"@mock.patch(\u0027keystoneclient.common.cms._check_files_accessible\u0027)\"","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"deb0b866b763cb964084266ee22fef39b8eac9dc","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        self.assertEqual((output, retcode), (\u0027\u0027, -1))"},{"line_number":186,"context_line":"        self.assertIn(\u0027proc stderr\u0027, err)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def test_process_communicate_handle_oserror_no_exception(self):"},{"line_number":189,"context_line":"        process_mock \u003d mock.Mock()"},{"line_number":190,"context_line":"        process_mock.communicate.return_value \u003d \u0027out\u0027, \u0027err\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_19f21e07","line":187,"in_reply_to":"da20952f_be48b8b4","updated":"2015-09-09 18:53:02.000000000","message":"Because _check_files_accessible will not be called if process.communicate doesn\u0027t raise OSError.","commit_id":"a26378342b2d3e970176df5e5c6811a555940b0b"}]}
