)]}'
{"climateclient/v1/leases.py":[{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"de657cc3037f196548cbe52255a6873389601bb5","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        values \u003d {}"},{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":"        lease_length_option \u003d prolong_for \\"},{"line_number":45,"context_line":"            if prolong_for else reduce_by if reduce_by else None"},{"line_number":46,"context_line":"        if lease_length_option:"},{"line_number":47,"context_line":"            if lease_length_option.endswith(\u0027s\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FSDY%3D","line":44,"updated":"2014-04-15 15:38:03.000000000","message":"This could be write in this way: \"prolong_for or reduce_by\"","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":10200,"name":"Christian Martinez","email":"chmartinez35@gmail.com","username":"cmart"},"change_message_id":"8ddc9ffbaa6e11801b9e13d19909f9afdbb4b0e1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        values \u003d {}"},{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":"        lease_length_option \u003d prolong_for \\"},{"line_number":45,"context_line":"            if prolong_for else reduce_by if reduce_by else None"},{"line_number":46,"context_line":"        if lease_length_option:"},{"line_number":47,"context_line":"            if lease_length_option.endswith(\u0027s\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2F7XA%3D","line":44,"in_reply_to":"AAAAW3%2F%2FQ%2BU%3D","updated":"2014-04-16 13:22:14.000000000","message":"OK with this. However, the xor won´t work correctly when both options are empty. I\u0027ll use Dina\u0027s solution","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"d423870c326c975170c8a740586ea179a2df4b12","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        values \u003d {}"},{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":"        lease_length_option \u003d prolong_for \\"},{"line_number":45,"context_line":"            if prolong_for else reduce_by if reduce_by else None"},{"line_number":46,"context_line":"        if lease_length_option:"},{"line_number":47,"context_line":"            if lease_length_option.endswith(\u0027s\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FQ%2BU%3D","line":44,"in_reply_to":"AAAAW3%2F%2FRtk%3D","updated":"2014-04-15 17:20:35.000000000","message":"Agree with Dina, but it seems too verbose.\n\nI would do this:\n\nlease_length_option \u003d None \nif bool(prolong_for) ^ bool(reduce_by):\n  lease_length_option \u003d prolong_for or reduce_by \nelse:\n  raise some_exception","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"04d8c0fc0cb390530a795d85ab534d9b7481187f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        values \u003d {}"},{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":"        lease_length_option \u003d prolong_for \\"},{"line_number":45,"context_line":"            if prolong_for else reduce_by if reduce_by else None"},{"line_number":46,"context_line":"        if lease_length_option:"},{"line_number":47,"context_line":"            if lease_length_option.endswith(\u0027s\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FRtk%3D","line":44,"in_reply_to":"AAAAW3%2F%2FSDY%3D","updated":"2014-04-15 16:02:07.000000000","message":"well, Pablo, he we\u0027ll have the problem if *both* of the flags will be passed. But I also don\u0027t like one-line complex if\u0027s.\n\nso probably it should look like:\n\nif (prolong_for or reduce_by) and not (prolong_for and reduce_by):\n    lease_length_option \u003d prolong_for or reduce_by\nelif prolong_for and reduce_by:\n    raise Some_Nice_Exc_here\nelse:\n    lease_length_option \u003d None","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"db3f11f1c13516746ab39410cbf76a17570e8d3d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if (prolong_for or reduce_by) and not (prolong_for and reduce_by):"},{"line_number":46,"context_line":"            lease_length_option \u003d prolong_for or reduce_by"},{"line_number":47,"context_line":"        elif prolong_for and reduce_by:"},{"line_number":48,"context_line":"            message \u003d _(\"argument --reduce-by: \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2F6%2Bg%3D","line":45,"updated":"2014-04-16 13:57:42.000000000","message":"I think that all this code could be removed because argparse is validating the mutual exclusion for free (I noticed this after reading the comments of the previous patch). So the \"prolong_for or reduce_by\" could be enough.","commit_id":"6eca57854fe45d7b381c5c91571973ffac79a341"},{"author":{"_account_id":10200,"name":"Christian Martinez","email":"chmartinez35@gmail.com","username":"cmart"},"change_message_id":"7ca9fa083f83914a4a0a3e7854d532160699f526","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        if name:"},{"line_number":43,"context_line":"            values[\u0027name\u0027] \u003d name"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        if (prolong_for or reduce_by) and not (prolong_for and reduce_by):"},{"line_number":46,"context_line":"            lease_length_option \u003d prolong_for or reduce_by"},{"line_number":47,"context_line":"        elif prolong_for and reduce_by:"},{"line_number":48,"context_line":"            message \u003d _(\"argument --reduce-by: \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2Fp2Y%3D","line":45,"in_reply_to":"AAAAXH%2F%2F6%2Bg%3D","updated":"2014-04-18 13:57:45.000000000","message":"That\u0027s true, and that´s why I did it without these \"expensive check\" in the first time. However, I don´t think that having this is an error worth of a -1. It´s not an error, it´s a double check","commit_id":"6eca57854fe45d7b381c5c91571973ffac79a341"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ee22df2aba1cef359fff00df9aaa11545f0a8276","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        lease_length_option \u003d prolong_for or reduce_by"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        if lease_length_option:"},{"line_number":48,"context_line":"            if lease_length_option.endswith(\u0027s\u0027):"},{"line_number":49,"context_line":"                coefficient \u003d 1"},{"line_number":50,"context_line":"            elif lease_length_option.endswith(\u0027m\u0027):"},{"line_number":51,"context_line":"                coefficient \u003d 60"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FEJg%3D","line":48,"updated":"2014-04-24 09:24:25.000000000","message":"dammit, I missed the thing for the previous commit.\n\nhttps://github.com/stackforge/climate/blob/master/climate/openstack/common/timeutils.py\n\nI don\u0027t know if it\u0027s worth using it now by refactoring this method.\nLet me know by IRC how much time you think it would require for implementing it this way, and I\u0027ll see if I need to change my vote.","commit_id":"4ba92104826bfee4092c9be9c09221bae7e88935"}],"climateclient/v1/shell_commands/leases.py":[{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"de657cc3037f196548cbe52255a6873389601bb5","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            help\u003d\u0027Time to reduce lease by\u0027,"},{"line_number":238,"context_line":"            default\u003dNone"},{"line_number":239,"context_line":"        )"},{"line_number":240,"context_line":"        group.add_argument("},{"line_number":241,"context_line":"            \u0027--reduce_by\u0027,"},{"line_number":242,"context_line":"            help\u003dargparse.SUPPRESS,"},{"line_number":243,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FSA0%3D","line":240,"updated":"2014-04-15 15:38:03.000000000","message":"If --prolong_for is added due to backward compatibility, please don\u0027t add the same thing for the new parameter.","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"d423870c326c975170c8a740586ea179a2df4b12","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            help\u003d\u0027Time to reduce lease by\u0027,"},{"line_number":238,"context_line":"            default\u003dNone"},{"line_number":239,"context_line":"        )"},{"line_number":240,"context_line":"        group.add_argument("},{"line_number":241,"context_line":"            \u0027--reduce_by\u0027,"},{"line_number":242,"context_line":"            help\u003dargparse.SUPPRESS,"},{"line_number":243,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FRCw%3D","line":240,"in_reply_to":"AAAAW3%2F%2FRtc%3D","updated":"2014-04-15 17:20:35.000000000","message":"+1","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"04d8c0fc0cb390530a795d85ab534d9b7481187f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            help\u003d\u0027Time to reduce lease by\u0027,"},{"line_number":238,"context_line":"            default\u003dNone"},{"line_number":239,"context_line":"        )"},{"line_number":240,"context_line":"        group.add_argument("},{"line_number":241,"context_line":"            \u0027--reduce_by\u0027,"},{"line_number":242,"context_line":"            help\u003dargparse.SUPPRESS,"},{"line_number":243,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FRtc%3D","line":240,"in_reply_to":"AAAAW3%2F%2FSA0%3D","updated":"2014-04-15 16:02:07.000000000","message":"+1","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":10200,"name":"Christian Martinez","email":"chmartinez35@gmail.com","username":"cmart"},"change_message_id":"14b4c029aede8f36056b2c5e5fd433533f7530b1","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            help\u003d\u0027Time to reduce lease by\u0027,"},{"line_number":238,"context_line":"            default\u003dNone"},{"line_number":239,"context_line":"        )"},{"line_number":240,"context_line":"        group.add_argument("},{"line_number":241,"context_line":"            \u0027--reduce_by\u0027,"},{"line_number":242,"context_line":"            help\u003dargparse.SUPPRESS,"},{"line_number":243,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FRAM%3D","line":240,"in_reply_to":"AAAAW3%2F%2FSA0%3D","updated":"2014-04-15 17:16:54.000000000","message":"So.. I should remove that extra argument, right?","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"d423870c326c975170c8a740586ea179a2df4b12","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if parsed_args.prolong_for:"},{"line_number":252,"context_line":"            params[\u0027prolong_for\u0027] \u003d parsed_args.prolong_for"},{"line_number":253,"context_line":"        if parsed_args.reduce_by:"},{"line_number":254,"context_line":"            params[\u0027reduce_by\u0027] \u003d parsed_args.reduce_by"},{"line_number":255,"context_line":"        return params"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAW3%2F%2FRB8%3D","line":254,"updated":"2014-04-15 17:20:35.000000000","message":"this should be removed as well","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":10200,"name":"Christian Martinez","email":"chmartinez35@gmail.com","username":"cmart"},"change_message_id":"2eccce3816a10ed077ed2d31908f2b1032d94c41","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if parsed_args.prolong_for:"},{"line_number":252,"context_line":"            params[\u0027prolong_for\u0027] \u003d parsed_args.prolong_for"},{"line_number":253,"context_line":"        if parsed_args.reduce_by:"},{"line_number":254,"context_line":"            params[\u0027reduce_by\u0027] \u003d parsed_args.reduce_by"},{"line_number":255,"context_line":"        return params"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2F7iw%3D","line":254,"in_reply_to":"AAAAW3%2F%2FRB8%3D","updated":"2014-04-16 12:49:51.000000000","message":"May I ask why?","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"2c60977df592d93a8c8991e9671bca97487ca8c5","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if parsed_args.prolong_for:"},{"line_number":252,"context_line":"            params[\u0027prolong_for\u0027] \u003d parsed_args.prolong_for"},{"line_number":253,"context_line":"        if parsed_args.reduce_by:"},{"line_number":254,"context_line":"            params[\u0027reduce_by\u0027] \u003d parsed_args.reduce_by"},{"line_number":255,"context_line":"        return params"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2F7NQ%3D","line":254,"in_reply_to":"AAAAXH%2F%2F7RQ%3D","updated":"2014-04-16 13:30:30.000000000","message":"+1 to cmart","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"},{"author":{"_account_id":10200,"name":"Christian Martinez","email":"chmartinez35@gmail.com","username":"cmart"},"change_message_id":"d6468f56be4d8ca7b4f171a86bf5632a899a685b","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        if parsed_args.prolong_for:"},{"line_number":252,"context_line":"            params[\u0027prolong_for\u0027] \u003d parsed_args.prolong_for"},{"line_number":253,"context_line":"        if parsed_args.reduce_by:"},{"line_number":254,"context_line":"            params[\u0027reduce_by\u0027] \u003d parsed_args.reduce_by"},{"line_number":255,"context_line":"        return params"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2F7RQ%3D","line":254,"in_reply_to":"AAAAXH%2F%2F7iw%3D","updated":"2014-04-16 13:23:16.000000000","message":"This code is used to setup the params to be passed to the update function. It was nothing to do with the \"_\" arguments","commit_id":"3b698e7e006c01acdf4f2edc59a7993f1fa69481"}]}
