)]}'
{"dragonflow/cli/df_db.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f567a65d75a271a4d931f166baf24e3dcee1387c","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        print(\"Json {} is not valid\".format(json_str))"},{"line_number":230,"context_line":"        return"},{"line_number":231,"context_line":"    except TypeError:"},{"line_number":232,"context_line":"        print(\"Json {} is not applicable to {}\".format(json_str, model))"},{"line_number":233,"context_line":"        return"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b9e59c3a","line":232,"range":{"start_line":232,"start_character":65,"end_line":232,"end_character":70},"updated":"2018-05-22 17:42:31.000000000","message":"I think this should stay \u0027table\u0027","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"c5828deaff92875f469a349714820b28376d8d55","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        print(\"Json {} is not valid\".format(json_str))"},{"line_number":230,"context_line":"        return"},{"line_number":231,"context_line":"    except TypeError:"},{"line_number":232,"context_line":"        print(\"Json {} is not applicable to {}\".format(json_str, model))"},{"line_number":233,"context_line":"        return"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_308ba31f","line":232,"range":{"start_line":232,"start_character":65,"end_line":232,"end_character":70},"in_reply_to":"5f7c97a3_b9e59c3a","updated":"2018-05-28 12:40:58.000000000","message":"Fixed","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f567a65d75a271a4d931f166baf24e3dcee1387c","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    json_str \u003d \"\""},{"line_number":248,"context_line":"    try:"},{"line_number":249,"context_line":"        with open(file_path, \u0027rb\u0027) as f:"},{"line_number":250,"context_line":"            json_str \u003d f.read()"},{"line_number":251,"context_line":"    except IOError:"},{"line_number":252,"context_line":"        print(\"Can\u0027t read data from file \" + file_path)"},{"line_number":253,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_59cec8b4","line":250,"range":{"start_line":250,"start_character":0,"end_line":250,"end_character":31},"updated":"2018-05-22 17:42:31.000000000","message":"If you change this line to `return f.read()`, you don\u0027t need the variable `json_str`.","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"c5828deaff92875f469a349714820b28376d8d55","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    json_str \u003d \"\""},{"line_number":248,"context_line":"    try:"},{"line_number":249,"context_line":"        with open(file_path, \u0027rb\u0027) as f:"},{"line_number":250,"context_line":"            json_str \u003d f.read()"},{"line_number":251,"context_line":"    except IOError:"},{"line_number":252,"context_line":"        print(\"Can\u0027t read data from file \" + file_path)"},{"line_number":253,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b0957342","line":250,"range":{"start_line":250,"start_character":0,"end_line":250,"end_character":31},"in_reply_to":"5f7c97a3_59cec8b4","updated":"2018-05-28 12:40:58.000000000","message":"Done","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f567a65d75a271a4d931f166baf24e3dcee1387c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"    def handle(args):"},{"line_number":360,"context_line":"        table \u003d args.table"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        if args.file:"},{"line_number":363,"context_line":"            file_path \u003d args.file"},{"line_number":364,"context_line":"            json_str \u003d read_json_from_file(file_path)"},{"line_number":365,"context_line":"        elif args.json:"},{"line_number":366,"context_line":"            json_str \u003d args.json"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            print(\"JSON or file argument must be supplied \""},{"line_number":369,"context_line":"                  \"(use \u0027-h\u0027 for details)\")"},{"line_number":370,"context_line":"        if not json_str:"},{"line_number":371,"context_line":"            return"},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_990780ca","line":369,"range":{"start_line":362,"start_character":0,"end_line":369,"end_character":43},"updated":"2018-05-22 17:42:31.000000000","message":"This block can be moved into a function","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"c5828deaff92875f469a349714820b28376d8d55","unresolved":false,"context_lines":[{"line_number":359,"context_line":"    def handle(args):"},{"line_number":360,"context_line":"        table \u003d args.table"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        if args.file:"},{"line_number":363,"context_line":"            file_path \u003d args.file"},{"line_number":364,"context_line":"            json_str \u003d read_json_from_file(file_path)"},{"line_number":365,"context_line":"        elif args.json:"},{"line_number":366,"context_line":"            json_str \u003d args.json"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            print(\"JSON or file argument must be supplied \""},{"line_number":369,"context_line":"                  \"(use \u0027-h\u0027 for details)\")"},{"line_number":370,"context_line":"        if not json_str:"},{"line_number":371,"context_line":"            return"},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_108547cf","line":369,"range":{"start_line":362,"start_character":0,"end_line":369,"end_character":43},"in_reply_to":"5f7c97a3_990780ca","updated":"2018-05-28 12:40:58.000000000","message":"Done","commit_id":"bd2d0f04b36bddcd0326a1ae5a29579bb76680f8"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"3aba2063f317093d5afef6c7134af1662a09d395","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    return obj"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"def update_object_from_json(json_str, table):"},{"line_number":195,"context_line":"    \"\"\"update an object that described by json"},{"line_number":196,"context_line":"     string to dragonflow db."},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1239c6d5","line":194,"updated":"2018-05-29 06:43:06.000000000","message":"Nit: Add and update are basically the same apart from the method called in nb_api.\nWhy not unite them and just send the method to be called?","commit_id":"3620a8490bd5aede1b025ad2fe1c087820906742"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"3aba2063f317093d5afef6c7134af1662a09d395","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        return args.json"},{"line_number":260,"context_line":"    else:"},{"line_number":261,"context_line":"        print(\"JSON or file argument must be supplied \""},{"line_number":262,"context_line":"              \"(use \u0027-h\u0027 for details)\")"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"def _check_valid_table(parser, table_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_d2158e3e","line":262,"updated":"2018-05-29 06:43:06.000000000","message":"Maybe explicitly return None as default? It would be cleaner...","commit_id":"3620a8490bd5aede1b025ad2fe1c087820906742"}]}
