)]}'
{"tripleoclient/v1/undercloud_backup.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6f5f586c53983fa924f1b7c4889b506942825a28","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            \"--exclude-path\","},{"line_number":48,"context_line":"            default\u003d[],"},{"line_number":49,"context_line":"            action\u003d\"append\","},{"line_number":50,"context_line":"            help\u003d_(\"Exclude patch when performing the Undercloud Backup, \""},{"line_number":51,"context_line":"                   \"this option can be specified multiple times. \""},{"line_number":52,"context_line":"                   \"Defaults to: none \""},{"line_number":53,"context_line":"                   \"i.e. --exclude-path /this/is/a/folder/ \""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_629f9150","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":33},"updated":"2018-05-04 07:12:50.000000000","message":"path","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"},{"author":{"_account_id":20775,"name":"Carlos Camacho","email":"ccamacho@redhat.com","username":"ccamacho"},"change_message_id":"ac2d953450b5ecb54f7599ab176f402e8035a824","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            \"--exclude-path\","},{"line_number":48,"context_line":"            default\u003d[],"},{"line_number":49,"context_line":"            action\u003d\"append\","},{"line_number":50,"context_line":"            help\u003d_(\"Exclude patch when performing the Undercloud Backup, \""},{"line_number":51,"context_line":"                   \"this option can be specified multiple times. \""},{"line_number":52,"context_line":"                   \"Defaults to: none \""},{"line_number":53,"context_line":"                   \"i.e. --exclude-path /this/is/a/folder/ \""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a00da138","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":33},"in_reply_to":"5f7c97a3_629f9150","updated":"2018-05-04 09:04:49.000000000","message":"Thanks Marios, done.","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"6c48b4f94d648f69748f1864c5ddb952fd3671ab","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        clients \u003d self.app.client_manager"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        merge_paths \u003d sorted(list(set(parsed_args.add_path)))"},{"line_number":63,"context_line":"        for exc in parsed_args.exclude_path:"},{"line_number":64,"context_line":"            if exc in merge_paths:"},{"line_number":65,"context_line":"                merge_paths.remove(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_05fd8739","line":62,"updated":"2018-05-04 08:56:30.000000000","message":"I was doing some small test to see what would happen if the user would \"misunderstand\" the use of the --exclude-patch/--add-path option and would include multiple directories per option, for example:\n\npython test_args.py --exclude-path \"/home/jfrancoa,/home/stack/files,/etc/var/\"\n\nargparser would allow it in fact, and we would end up with a one-element list:\n\n[\"/home/jfrancoa,/home/stack/files,/etc/var/\"]\n\nIf we change the argument to the following:\n\nparser.add_argument(\n            \"--exclude-path\",\n            default\u003d[],\n            type\u003dlambda s: s.split(\u0027,\u0027),\n            action\u003d\"append\",\n            help\u003d(\"Exclude patch when performing the Undercloud Backup, \"\n                   \"this option can be specified multiple times. \"\n                   \"Defaults to: none \"\n                   \"i.e. --exclude-path /this/is/a/folder/ \"\n                   \" --exclude-path /this/is/a/texfile.txt\")\n        )\n\noptions \u003d parser.parse_args()\nprint reduce(lambda x, y: x+y, options.exclude_path)\n\nThe example above would return a list with each of the directories:\n\npython test_args.py --exclude-path /home/jfrancoa,/home/stack/files,/etc/var/\n[\u0027/home/jfrancoa\u0027, \u0027/home/stack/files\u0027, \u0027/etc/var/\u0027]\n\nAnd, it would even allow to add --exclude-path multiple times, appending the element to the list:\n\npython test_args.py --exclude-path /home/jfrancoa,/home/stack/files,/etc/var/ --exclude-path /var/log --exclude-path /home/ccamacho\n[\u0027/home/jfrancoa\u0027, \u0027/home/stack/files\u0027, \u0027/etc/var/\u0027, \u0027/var/log\u0027, \u0027/home/ccamacho\u0027]\n\nYou could consider it in a follow up patch.","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"},{"author":{"_account_id":20775,"name":"Carlos Camacho","email":"ccamacho@redhat.com","username":"ccamacho"},"change_message_id":"ac2d953450b5ecb54f7599ab176f402e8035a824","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        clients \u003d self.app.client_manager"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        merge_paths \u003d sorted(list(set(parsed_args.add_path)))"},{"line_number":63,"context_line":"        for exc in parsed_args.exclude_path:"},{"line_number":64,"context_line":"            if exc in merge_paths:"},{"line_number":65,"context_line":"                merge_paths.remove(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8008a528","line":62,"in_reply_to":"5f7c97a3_05fd8739","updated":"2018-05-04 09:04:49.000000000","message":"Yeah, we might change all behaviour in a follow-up patch, although the help example should avoid this...\n\n\"i.e. --exclude-path /this/is/a/folder/ \"\n\" --exclude-path /this/is/a/texfile.txt\")","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"},{"author":{"_account_id":20775,"name":"Carlos Camacho","email":"ccamacho@redhat.com","username":"ccamacho"},"change_message_id":"939cc78493e1cbeb815421ad3355d0bd2aab2592","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        clients \u003d self.app.client_manager"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        merge_paths \u003d sorted(list(set(parsed_args.add_path)))"},{"line_number":63,"context_line":"        for exc in parsed_args.exclude_path:"},{"line_number":64,"context_line":"            if exc in merge_paths:"},{"line_number":65,"context_line":"                merge_paths.remove(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3c951041","line":62,"in_reply_to":"5f7c97a3_1b8871e5","updated":"2018-05-08 05:45:41.000000000","message":"Yeahp, also imagine the spaghetti doing --add-path \"/home/stack/,/var/lib/mysql/,/etc/passwd\" --exclude-path \"/var/lib/mysql/\", in any case something to consider **adding a lot of unit tests... thank you guys for the feedback!","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"c1e5485680676dd9ea7e53628900fbf2bc88f942","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        clients \u003d self.app.client_manager"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        merge_paths \u003d sorted(list(set(parsed_args.add_path)))"},{"line_number":63,"context_line":"        for exc in parsed_args.exclude_path:"},{"line_number":64,"context_line":"            if exc in merge_paths:"},{"line_number":65,"context_line":"                merge_paths.remove(exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_1b8871e5","line":62,"in_reply_to":"5f7c97a3_8008a528","updated":"2018-05-07 08:03:48.000000000","message":"i suspect it would fail pretty quickly trying to backup \"/home/jfrancoa,/home/stack/files,/etc/var/\" with a file not found right? i think it makes sense to add support for \"comma,list\" in the --exclude and --add-path but also agree it could be a followup","commit_id":"199724ddc25f1832c6ad574c3e7d44e3afa256e1"}]}
