)]}'
{"bin/swift-object-info":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c5594c0957208cffb10cd501b10c7b5e1617fdd","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        for node in nodes:"},{"line_number":97,"context_line":"            print (\u0027  %s:%s - /srv/node/%s/%s/%s.data\u0027 %"},{"line_number":98,"context_line":"                   (node[\u0027ip\u0027], node[\u0027port\u0027], node[\u0027device\u0027],"},{"line_number":99,"context_line":"                    storage_directory(\u0027objects\u0027, part, obj_hash), ts))"},{"line_number":100,"context_line":"        print"},{"line_number":101,"context_line":"        print \u0027note: /srv/node is used as default value of `devices`, \u0027\\"},{"line_number":102,"context_line":"              \u0027the real value is set in object-server.conf \u0027\\"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAWH%2F%2BigA%3D","line":99,"updated":"2014-03-26 03:24:46.000000000","message":"storage directory - nice!","commit_id":"a37f90b3f15bf8936663c0fd09f6da2c55de73bd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c5594c0957208cffb10cd501b10c7b5e1617fdd","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":108,"context_line":"    parser \u003d OptionParser()"},{"line_number":109,"context_line":"    parser.set_defaults(check_etag\u003dTrue, swift_dir\u003d\u0027/etc/swift\u0027)"},{"line_number":110,"context_line":"    parser.add_option("},{"line_number":111,"context_line":"        \u0027-n\u0027, \u0027--no-check-etag\u0027,"},{"line_number":112,"context_line":"        action\u003d\"store_false\", dest\u003d\"check_etag\","}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAWH%2F%2Bihg%3D","line":109,"updated":"2014-03-26 03:24:46.000000000","message":"normally it\u0027s best to set the default next to the option, I think the check_etag flag was trying to \"here be dragons\" the \"store_false\" action which is some what rare.\n\nI think it\u0027d be much better to just stuff the \u0027/etc/swift\u0027 string in as the default\u003d kwarg when you add the -d option.","commit_id":"a37f90b3f15bf8936663c0fd09f6da2c55de73bd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c5594c0957208cffb10cd501b10c7b5e1617fdd","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        help\u003d\"Don\u0027t verify file contents against stored etag\")"},{"line_number":114,"context_line":"    parser.add_option("},{"line_number":115,"context_line":"        \u0027-d\u0027, \u0027--swift-dir\u0027,"},{"line_number":116,"context_line":"        help\u003d\"Pass location of swift directory\")"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    options, args \u003d parser.parse_args()"},{"line_number":119,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAWH%2F%2Bihc%3D","line":116,"updated":"2014-03-26 03:24:46.000000000","message":"right here, just default\u003d\u0027/etc/swift\u0027","commit_id":"a37f90b3f15bf8936663c0fd09f6da2c55de73bd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c5594c0957208cffb10cd501b10c7b5e1617fdd","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    options, args \u003d parser.parse_args()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    if len(args) \u003c 1:"},{"line_number":121,"context_line":"        print \"Usage: %s [-n] [-d] OBJECT_FILE\" % sys.argv[0]"},{"line_number":122,"context_line":"        sys.exit(1)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    print_object_info(args[0], check_etag\u003doptions.check_etag,"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAWH%2F%2Bigc%3D","line":121,"updated":"2014-03-26 03:24:46.000000000","message":"Optparse has some tooling to try and make a bit more DRY - it\u0027s not as good as argparse - but we can\u0027t have nice things until everyone gets python 2.7\n\nhttp://docs.python.org/2/library/optparse.html#generating-help\n\nmaybe add the usage string when you create the parser and then just:\n\nsys.exit(parser.print_help())","commit_id":"a37f90b3f15bf8936663c0fd09f6da2c55de73bd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c5594c0957208cffb10cd501b10c7b5e1617fdd","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        sys.exit(1)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    print_object_info(args[0], check_etag\u003doptions.check_etag,"},{"line_number":125,"context_line":"                      swift_dir\u003doptions.swift_dir)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAWH%2F%2BigQ%3D","line":125,"updated":"2014-03-26 03:24:46.000000000","message":"not that I think this list of options is going to keep growing forever, but just as cool hack you may find it interesting that you can say:\n\nprint_object_info(*args, **vars(options))\n\nand get about the same thing (assuming you check \"if len(args) !\u003d 1\" above)","commit_id":"a37f90b3f15bf8936663c0fd09f6da2c55de73bd"}]}
