)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":19226,"name":"Jacky_lei_zhang","email":"shleiz@cn.ibm.com","username":"lzhang"},"change_message_id":"fea39d84b5b42735541638743c7606d91f72d663","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"fa69d971_6c6bbab7","updated":"2016-01-07 07:40:24.000000000","message":"update commit message,thanks\nPlease see https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"908e0fba429ef346a155d92dd7821a27081e52c2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6a85b4512607eb90101ee2f6bf218c9d71269091","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     linwwu \u003cwlwwu@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-01-07 23:40:56 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u0027u\u0027 displayed before subnetpool-list\u0027s prefixes"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"there is useless \u0027u\u0027 in the showing of \"neutron subnetpool-list\","},{"line_number":10,"context_line":"please check bug/1531418 for details."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa69d971_a03683e5","line":7,"updated":"2016-01-07 14:52:26.000000000","message":"Maybe change to \"Remove \u0027u\u0027... \"","commit_id":"b5a8140e044e508e830a42f7d8b72885ee779045"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6a85b4512607eb90101ee2f6bf218c9d71269091","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u0027u\u0027 displayed before subnetpool-list\u0027s prefixes"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"there is useless \u0027u\u0027 in the showing of \"neutron subnetpool-list\","},{"line_number":10,"context_line":"please check bug/1531418 for details."},{"line_number":11,"context_line":"add formatter as subnet did in the code."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa69d971_e00c7b3d","line":9,"updated":"2016-01-07 14:52:26.000000000","message":"s/there/There","commit_id":"b5a8140e044e508e830a42f7d8b72885ee779045"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6a85b4512607eb90101ee2f6bf218c9d71269091","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"there is useless \u0027u\u0027 in the showing of \"neutron subnetpool-list\","},{"line_number":10,"context_line":"please check bug/1531418 for details."},{"line_number":11,"context_line":"add formatter as subnet did in the code."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4e1502c379032da240ad51cce8be8c1ca558ef15"},{"line_number":14,"context_line":"Closes-Bug:#1531418"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa69d971_60196b79","line":11,"updated":"2016-01-07 14:52:26.000000000","message":"s/add/Add","commit_id":"b5a8140e044e508e830a42f7d8b72885ee779045"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6a85b4512607eb90101ee2f6bf218c9d71269091","unresolved":false,"context_lines":[{"line_number":11,"context_line":"add formatter as subnet did in the code."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I4e1502c379032da240ad51cce8be8c1ca558ef15"},{"line_number":14,"context_line":"Closes-Bug:#1531418"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa69d971_a03d23bd","line":14,"updated":"2016-01-07 14:52:26.000000000","message":"Can you put a space before the # ?  I\u0027m wondering if that is why the bug didn\u0027t get updated automatically when the review went out.","commit_id":"b5a8140e044e508e830a42f7d8b72885ee779045"}],"neutronclient/neutron/v2_0/subnetpool.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"9421538a66221ac27165a51e0bc1ea8682648552","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from neutronclient._i18n import _"},{"line_number":18,"context_line":"from neutronclient.neutron import v2_0 as neutronV20"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":21,"context_line":"    try:"},{"line_number":22,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":23,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_745ee377","line":20,"updated":"2016-01-08 04:38:59.000000000","message":"How about making it a common utility so every one can use?","commit_id":"84a0477ef941275d9bca4c07779413bb6f9ebf1c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7e15f6f61e3bec6f31cb814986b83c50db236865","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class ListSubnetPool(neutronV20.ListCommand):"},{"line_number":50,"context_line":"    \"\"\"List subnetpools that belong to a given tenant.\"\"\""},{"line_number":51,"context_line":"    _formatters\u003d{\u0027prefixes\u0027: _format_prefixes,}"},{"line_number":52,"context_line":"    resource \u003d \u0027subnetpool\u0027"},{"line_number":53,"context_line":"    list_columns \u003d [\u0027id\u0027, \u0027name\u0027, \u0027prefixes\u0027,"},{"line_number":54,"context_line":"                    \u0027default_prefixlen\u0027, \u0027address_scope_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_9b362ab3","line":51,"range":{"start_line":51,"start_character":29,"end_line":51,"end_character":45},"updated":"2016-01-08 03:49:22.000000000","message":"You know what, I faced a similar error yesterday, and found encode(´ascii´) to be effective as a formatter.\nCan you check and verify the same?","commit_id":"84a0477ef941275d9bca4c07779413bb6f9ebf1c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e0f4e60fe0c220dad2ecc9f1574af0beae86dbdf","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":24,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":25,"context_line":"    except (TypeError, KeyError):"},{"line_number":26,"context_line":"         return \u0027\u0027"},{"line_number":27,"context_line":"def add_updatable_arguments(parser):"},{"line_number":28,"context_line":"    parser.add_argument("},{"line_number":29,"context_line":"        \u0027--min-prefixlen\u0027, type\u003dint,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_8c1583e6","line":26,"updated":"2016-01-08 07:00:43.000000000","message":"pep8 should have failed here because there is nospace between the 2 functions...","commit_id":"df7183f2a0ec9b9a72a28c60f21749f114788c93"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5d535896982d7004bf7c892bde86dab84c38933a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":23,"context_line":"    try:"},{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_9adcc747","line":25,"updated":"2016-01-08 10:45:54.000000000","message":"Why do you need jsonutils.dump here?\nEach element of prefixes is a string, so there is no need to use json.dumps.\n\n  return \u0027\\n\u0027.join(pool for pool in subnetpool[\u0027prefixes\u0027])","commit_id":"77c0e0d48b44902d063af0dd9c1960ecc347fac5"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5d535896982d7004bf7c892bde86dab84c38933a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def add_updatable_arguments(parser):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa69d971_5aa3af9e","line":27,"updated":"2016-01-08 10:45:54.000000000","message":"In a case of error, it is better to show the original value.\nHow about:\n\n  return subnetpool[\u0027prefixes\u0027]","commit_id":"77c0e0d48b44902d063af0dd9c1960ecc347fac5"},{"author":{"_account_id":14101,"name":"yapeng Yang","email":"a394954369@gmail.com","username":"yapeng"},"change_message_id":"6f8a2e84b9cd5c446597a6e3e1e2a6b5331bc2b7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from neutronclient._i18n import _"},{"line_number":18,"context_line":"from neutronclient.neutron import v2_0 as neutronV20"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":21,"context_line":"    try:"},{"line_number":22,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":23,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa69d971_7141bc62","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":33},"updated":"2016-01-11 03:16:01.000000000","message":"Is there format_prefixes  better? bring into correspondence withstay the same，","commit_id":"ea7a620aad3e6e99ed28a671f9ba0f30f87f7ac8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0d66f5bd5d6b3a5d5f46ea950df90d5f3260b015","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":23,"context_line":"    try:"},{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_6b31a4ec","line":25,"updated":"2016-01-11 17:07:02.000000000","message":"My comment on patch set 6 again. I see no positive or negative response from the author.\n\nWhy do you need jsonutils.dump here?\nEach element of prefixes is a string, so there is no need to use json.dumps.\n\n  return \u0027\\n\u0027.join(pool for pool in subnetpool[\u0027prefixes\u0027])","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"c1fe92830fc5e44bb2c435fc3773031509fcbae2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":23,"context_line":"    try:"},{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_3bf58682","line":25,"in_reply_to":"da6ed579_19b21295","updated":"2016-01-13 16:08:58.000000000","message":"If we use your approach, we will see unnecessary \" (double quote) around each prefix. I think double quotes are completely unnecessary.","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"664bc484a10e6780a11fb9b921bcda8ab6dadd48","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":23,"context_line":"    try:"},{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_19b21295","line":25,"in_reply_to":"da6ed579_de2b6132","updated":"2016-01-13 16:05:13.000000000","message":"I cannot understand your point.\nThe reason we see u\u0027\u0027 now is that we print a list.\n\"pool\" is a string, so _format_prefixes returns a simple unicode string.\nAs a result, u\u0027\u0027 is no longer displayed.\n\nWhen I apply my comment, I got the following result.\nWhat is a problem?\n\n  +--------------------------------------+-------+---------------+-------------------+------------------+\n  | id                                   | name  | prefixes      | default_prefixlen | address_scope_id |\n  +--------------------------------------+-------+---------------+-------------------+------------------+\n  | 3b5bfac8-c3f5-42e8-a515-ca7bc1048fbc | pool1 | 172.18.0.0/20 | 24                |                  |\n  +--------------------------------------+-------+---------------+-------------------+------------------+","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":19383,"name":"linwei wu","email":"wlwwu@cn.ibm.com","username":"linwwu"},"change_message_id":"19488c9a4e0af5394e629dc8e927fa59b5dd8674","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _format_prefixes(subnetpool):"},{"line_number":23,"context_line":"    try:"},{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_de2b6132","line":25,"in_reply_to":"fa69d971_6b31a4ec","updated":"2016-01-12 02:03:03.000000000","message":"hi,\n\nwhat we want to format is to make unicode\u0027s prefixes from db to be display normal without u.\n\nif we use your way, it does nothing about this format. and I use this way just as subnet.py did, you can check that code for reference.","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"0d66f5bd5d6b3a5d5f46ea950df90d5f3260b015","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def add_updatable_arguments(parser):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_0b590835","line":27,"updated":"2016-01-11 17:07:02.000000000","message":"My comment on patch set 6 again. I see no positive or negative response from the author.\n\n\nIn a case of error, it is better to show the original value.\nHow about:\n\n  return subnetpool[\u0027prefixes\u0027]","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"664bc484a10e6780a11fb9b921bcda8ab6dadd48","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def add_updatable_arguments(parser):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_5b271a64","line":27,"in_reply_to":"da6ed579_7ef6f5d8","updated":"2016-01-13 16:05:13.000000000","message":"Why do we need to care KeyError? This formatter is defined for \u0027prefixes\u0027 attribute and if a returned subnetpool has no \u0027prefixes\u0027 attribute, this formatter method will be never called.\nThus I think we can assume that \u0027prefixes\u0027 exists and we can show subnetpool[\u0027prefixes\u0027] when an exception.","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"},{"author":{"_account_id":19383,"name":"linwei wu","email":"wlwwu@cn.ibm.com","username":"linwwu"},"change_message_id":"19488c9a4e0af5394e629dc8e927fa59b5dd8674","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return \u0027\\n\u0027.join([jsonutils.dumps(pool) for pool in"},{"line_number":25,"context_line":"                          subnetpool[\u0027prefixes\u0027]])"},{"line_number":26,"context_line":"    except (TypeError, KeyError):"},{"line_number":27,"context_line":"        return \u0027\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def add_updatable_arguments(parser):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_7ef6f5d8","line":27,"in_reply_to":"fa69d971_0b590835","updated":"2016-01-12 02:03:03.000000000","message":"Hi,\n\nif we got keyerror, it means that prefixes is not a right key, so it raises keyerror. if you return subnetpool[\u0027prefixes\u0027], it will raises keyerror again. the same result got if we got type error.\n\nso that\u0027s why I return \u0027\u0027. and this way is also accepted in subnet.py.","commit_id":"29f7e5fb9d990306b26b6f04626342a29b58db97"}]}
