)]}'
{"climateclient/utils.py":[{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        raise exception.ClimateClientException(_(\"Unsupportable date \""},{"line_number":151,"context_line":"                                                 \"format for lease \""},{"line_number":152,"context_line":"                                                 \"parameter\"))"},{"line_number":153,"context_line":"    seconds \u003d int(elapsed_time[:-1]) * coefficient"},{"line_number":154,"context_line":"    return seconds"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLlc%3D","line":153,"updated":"2014-04-23 14:22:28.000000000","message":"If someone who hates Climate sets the --before-end-notification with a value like 2dd, the int() will throw a ValueError. Please handle that case accordingly.","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"c84f44a70fd9ebab6a7f469e87a49301ec060fa9","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    elif elapsed_time.endswith(\u0027d\u0027):"},{"line_number":148,"context_line":"        coefficient \u003d 24 * 60 * 60"},{"line_number":149,"context_line":"    else:"},{"line_number":150,"context_line":"        raise exception.ClimateClientException(_(\"Unsupportable date \""},{"line_number":151,"context_line":"                                                 \"format for lease \""},{"line_number":152,"context_line":"                                                 \"parameter\"))"},{"line_number":153,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2FIJQ%3D","line":150,"updated":"2014-04-23 20:12:09.000000000","message":"The parameter is not a date, is a time delta, so the exception message should be \"Unsupportable date delta\" or something like that.","commit_id":"9524ef5d39727f5dea8d195c76bf3867a9ccfdf3"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"c84f44a70fd9ebab6a7f469e87a49301ec060fa9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        raise exception.ClimateClientException(_(\"Unsupportable date \""},{"line_number":151,"context_line":"                                                 \"format for lease \""},{"line_number":152,"context_line":"                                                 \"parameter\"))"},{"line_number":153,"context_line":"    try:"},{"line_number":154,"context_line":"        elapsed_time_to_int \u003d int(elapsed_time[:-1])"},{"line_number":155,"context_line":"        seconds \u003d elapsed_time_to_int * coefficient"},{"line_number":156,"context_line":"        return seconds"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2FILs%3D","line":153,"updated":"2014-04-23 20:12:09.000000000","message":"Enclose only the elapsed_time.... line in the try/except","commit_id":"9524ef5d39727f5dea8d195c76bf3867a9ccfdf3"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"c84f44a70fd9ebab6a7f469e87a49301ec060fa9","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        seconds \u003d elapsed_time_to_int * coefficient"},{"line_number":156,"context_line":"        return seconds"},{"line_number":157,"context_line":"    except Exception as e:"},{"line_number":158,"context_line":"        message \u003d (\"Unsupportable date format for lease parameter.\""},{"line_number":159,"context_line":"                   \"Exception: %s\" % e.message)"},{"line_number":160,"context_line":"        raise exception.ClimateClientException(message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAXH%2F%2FILc%3D","line":158,"updated":"2014-04-23 20:12:09.000000000","message":"Add the _() method to the message (i18n)\nPlease change the message according my other comment.","commit_id":"9524ef5d39727f5dea8d195c76bf3867a9ccfdf3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ab70230d978daa982fd87714ebe72fa9effa15c4","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def from_elapsed_time_to_seconds(elapsed_time):"},{"line_number":141,"context_line":"    if elapsed_time.endswith(\u0027s\u0027):"},{"line_number":142,"context_line":"        coefficient \u003d 1"},{"line_number":143,"context_line":"    elif elapsed_time.endswith(\u0027m\u0027):"},{"line_number":144,"context_line":"        coefficient \u003d 60"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FEVw%3D","line":141,"updated":"2014-04-24 09:18:08.000000000","message":"here in a helper module, a docstring is at least a minimum, with precising the type of elapsed_time and a possible value","commit_id":"b456560a4f718739ae82ab2011d2e1b9b8a35f76"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ab70230d978daa982fd87714ebe72fa9effa15c4","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"def from_elapsed_time_to_seconds(elapsed_time):"},{"line_number":141,"context_line":"    if elapsed_time.endswith(\u0027s\u0027):"},{"line_number":142,"context_line":"        coefficient \u003d 1"},{"line_number":143,"context_line":"    elif elapsed_time.endswith(\u0027m\u0027):"},{"line_number":144,"context_line":"        coefficient \u003d 60"},{"line_number":145,"context_line":"    elif elapsed_time.endswith(\u0027h\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FEUc%3D","line":142,"updated":"2014-04-24 09:18:08.000000000","message":"if I understand correctly, the whole method is for parsing a string into seconds, which is really error-prone.\n\nFor the whole datetime and time processing, there is an oslo-incubator module we can import in python-climateclient :\nhttps://github.com/stackforge/climate/blob/master/climate/openstack/common/timeutils.py#L178","commit_id":"b456560a4f718739ae82ab2011d2e1b9b8a35f76"}],"climateclient/v1/leases.py":[{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\"Manager for the lease connected requests.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def create(self, name, start, end, reservations, events,"},{"line_number":28,"context_line":"               before_end_notification):"},{"line_number":29,"context_line":"        values \u003d {\u0027name\u0027: name, \u0027start_date\u0027: start, \u0027end_date\u0027: end,"},{"line_number":30,"context_line":"                  \u0027reservations\u0027: reservations, \u0027events\u0027: events}"},{"line_number":31,"context_line":"        if before_end_notification:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLe4%3D","line":28,"updated":"2014-04-23 14:22:28.000000000","message":"If before_end_notification is optional. please add to this parameter the \u003dNone","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                                                         \"Min value is \""},{"line_number":38,"context_line":"                                                         \"3600 seconds \""},{"line_number":39,"context_line":"                                                         \"(one hour)\"))"},{"line_number":40,"context_line":"            else:"},{"line_number":41,"context_line":"                delta_sec \u003d datetime.timedelta(seconds\u003dseconds)"},{"line_number":42,"context_line":"                cur_end_date \u003d \\"},{"line_number":43,"context_line":"                    datetime.datetime.strptime(values[\u0027end_date\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLhU%3D","line":40,"updated":"2014-04-23 14:22:28.000000000","message":"The else: could be removed","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                delta_sec \u003d datetime.timedelta(seconds\u003dseconds)"},{"line_number":42,"context_line":"                cur_end_date \u003d \\"},{"line_number":43,"context_line":"                    datetime.datetime.strptime(values[\u0027end_date\u0027],"},{"line_number":44,"context_line":"                                               \u0027%Y-%m-%d %H:%M\u0027)"},{"line_number":45,"context_line":"                new_before_end_date \u003d cur_end_date - delta_sec"},{"line_number":46,"context_line":"                values[\u0027before_end_notification\u0027] \u003d datetime.datetime.strftime("},{"line_number":47,"context_line":"                    new_before_end_date, \u0027%Y-%m-%d %H:%M\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLgs%3D","line":44,"updated":"2014-04-23 14:22:28.000000000","message":"Please put the date format in a constant.","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                    new_before_end_date, \u0027%Y-%m-%d %H:%M\u0027"},{"line_number":48,"context_line":"                )"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        \"\"\"Creates lease from values passed.\"\"\""},{"line_number":51,"context_line":"        return self._create(\u0027/leases\u0027, values, \u0027lease\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def get(self, lease_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLf8%3D","line":50,"updated":"2014-04-23 14:22:28.000000000","message":"This should be under the method definition.","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            values[\u0027end_date\u0027] \u003d datetime.datetime.strftime("},{"line_number":85,"context_line":"                new_end_date, \u0027%Y-%m-%d %H:%M\u0027"},{"line_number":86,"context_line":"            )"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        if before_end_notification:"},{"line_number":89,"context_line":"            seconds \u003d \\"},{"line_number":90,"context_line":"                utils.from_elapsed_time_to_seconds(before_end_notification)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLeM%3D","line":87,"updated":"2014-04-23 14:22:28.000000000","message":"For this section, please consider the above comments.","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ab70230d978daa982fd87714ebe72fa9effa15c4","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                                                         \"Min value is \""},{"line_number":42,"context_line":"                                                         \"3600 seconds \""},{"line_number":43,"context_line":"                                                         \"(one hour)\"))"},{"line_number":44,"context_line":"            delta_sec \u003d datetime.timedelta(seconds\u003dseconds)"},{"line_number":45,"context_line":"            cur_end_date \u003d \\"},{"line_number":46,"context_line":"                datetime.datetime.strptime(values[\u0027end_date\u0027],"},{"line_number":47,"context_line":"                                           LEASE_UTC_TZ_FORMAT)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FEOE%3D","line":44,"updated":"2014-04-24 09:18:08.000000000","message":"see my comment in utils.py","commit_id":"b456560a4f718739ae82ab2011d2e1b9b8a35f76"}],"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":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                 \u0027(default: 24h later)\u0027,"},{"line_number":62,"context_line":"            default\u003dself.default_end"},{"line_number":63,"context_line":"        )"},{"line_number":64,"context_line":"        parser.add_argument("},{"line_number":65,"context_line":"            \u0027--before-end-notification\u0027,"},{"line_number":66,"context_line":"            dest\u003d\u0027before_end_notification\u0027,"},{"line_number":67,"context_line":"            help\u003d\u0027Elapsed time to send a notification \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLm8%3D","line":64,"updated":"2014-04-23 14:22:28.000000000","message":"Please update the help to include all the available options for this parameter (s/m/h/d)","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9331,"name":"Pablo Andres Fuente","email":"pablo.andres.fuente@gmail.com","username":"pafuent"},"change_message_id":"52ef139168905506db00e0246e1b41f39df55d72","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            help\u003dargparse.SUPPRESS,"},{"line_number":244,"context_line":"            default\u003dNone"},{"line_number":245,"context_line":"        )"},{"line_number":246,"context_line":"        parser.add_argument("},{"line_number":247,"context_line":"            \u0027--before-end-notification\u0027,"},{"line_number":248,"context_line":"            help\u003d\u0027Time to send a notification before lease ending\u0027,"},{"line_number":249,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAXH%2F%2FLmM%3D","line":246,"updated":"2014-04-23 14:22:28.000000000","message":"Maybe the help should be the same for CreateLease and UpdateLease","commit_id":"37b2b33b53c3fcffb41601f44a743c95f1bdaea6"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"cb6fa9725b505801ad046790ce01dcc7144265ea","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            dest\u003d\u0027before_end_notification\u0027,"},{"line_number":67,"context_line":"            help\u003d\u0027Elapsed time to send a notification \u0027"},{"line_number":68,"context_line":"                 \u0027before lease ending \u0027"},{"line_number":69,"context_line":"                 \u0027(default: 48h before).\u0027"},{"line_number":70,"context_line":"                 \u0027Available options are: seconds(s), minutes(m),\u0027"},{"line_number":71,"context_line":"                 \u0027hours(h) and days(d)\u0027,"},{"line_number":72,"context_line":"            default\u003dself.default_before_end"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXX%2F%2F5mI%3D","line":69,"updated":"2014-04-25 12:56:25.000000000","message":"I would remove this default notice","commit_id":"b456560a4f718739ae82ab2011d2e1b9b8a35f76"},{"author":{"_account_id":9225,"name":"Cristian A Sanchez","email":"cabsanchez@gmail.com","username":"casanch1"},"change_message_id":"cb6fa9725b505801ad046790ce01dcc7144265ea","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            \u0027--before-end-notification\u0027,"},{"line_number":252,"context_line":"            help\u003d\u0027Elapsed time to send a notification \u0027"},{"line_number":253,"context_line":"                 \u0027before lease ending \u0027"},{"line_number":254,"context_line":"                 \u0027(default: 48h before).\u0027"},{"line_number":255,"context_line":"                 \u0027Available options are: seconds(s), minutes(m),\u0027"},{"line_number":256,"context_line":"                 \u0027hours(h) and days(d)\u0027,"},{"line_number":257,"context_line":"            default\u003dNone"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXX%2F%2F5mY%3D","line":254,"updated":"2014-04-25 12:56:25.000000000","message":"I would remove this default notice","commit_id":"b456560a4f718739ae82ab2011d2e1b9b8a35f76"}]}
