)]}'
{"openstack_dashboard/utils/settings.py":[{"author":{"_account_id":6593,"name":"Dirk Mueller","email":"dirk@dmllr.de","username":"dmllr"},"change_message_id":"9bc1a38632cea2ff67cb7e630425e6afff2aa1d8","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            #       \u0027framework/widgets/help-panel/help-panel.html\u0027"},{"line_number":327,"context_line":"            #   ] \u003d \u0027themes/material/templates/framework/widgets/\\"},{"line_number":328,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":329,"context_line":"            (templates_part, override_path) \u003d theme_file.split(\u0027templates/\u0027)"},{"line_number":330,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":331,"context_line":"                                                theme_name + theme_file"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_d00e3631","line":329,"updated":"2017-07-10 13:24:50.000000000","message":"I guess the reason for the / was to avoid splits like \"foo/bar/notatemplate/blubb\" from matching. can we use os.path.* for this maybe?","commit_id":"2ef7e344ee020c81703766546f136f038ba523e4"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0364a47a719c667e8442974d237289d2959cd8f","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            #       \u0027framework/widgets/help-panel/help-panel.html\u0027"},{"line_number":330,"context_line":"            #   ] \u003d \u0027themes/material/templates/framework/widgets/\\"},{"line_number":331,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":332,"context_line":"            (templates_part, override_path) \u003d theme_file.split(\u0027templates/\u0027)"},{"line_number":333,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":334,"context_line":"                                                theme_name + theme_file"},{"line_number":335,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_ad716baa","line":332,"range":{"start_line":332,"start_character":57,"end_line":332,"end_character":76},"updated":"2017-08-30 07:08:55.000000000","message":"This potentially leads to unexpected behavior and I am afraid this is a bit dangerous.\n\n  In [1]: \u0027aaa/xxxtemplates/bbb\u0027.split(\u0027templates/\u0027)\n  Out[1]: [\u0027aaa/xxx\u0027, \u0027bbb\u0027]\n\nI think this is not what we want.\n\n---\n\nI think we need to split theme_file by a slash and search a path component whose name is \u0027templates\u0027.\n\nThought?","commit_id":"f358eb68e7a10183c2446f5bdeb024abed294337"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"a71c19610205bacc88015507fc9ebf144ef19a77","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            #       \u0027framework/widgets/help-panel/help-panel.html\u0027"},{"line_number":330,"context_line":"            #   ] \u003d \u0027themes/material/templates/framework/widgets/\\"},{"line_number":331,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":332,"context_line":"            (templates_part, override_path) \u003d theme_file.split(\u0027templates/\u0027)"},{"line_number":333,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":334,"context_line":"                                                theme_name + theme_file"},{"line_number":335,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_cb6edcfe","line":332,"range":{"start_line":332,"start_character":57,"end_line":332,"end_character":76},"in_reply_to":"7f287b81_ad716baa","updated":"2017-08-30 11:47:38.000000000","message":"Better now?","commit_id":"f358eb68e7a10183c2446f5bdeb024abed294337"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8de2e6447bdda511e5e30bb22d02bf8b0490d385","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":333,"context_line":"            override_path \u003d os.path.join("},{"line_number":334,"context_line":"                *[x for x in os.path.split(theme_file)"},{"line_number":335,"context_line":"                  if x not in [\u0027/tempates\u0027, \u0027templates\u0027]])"},{"line_number":336,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":337,"context_line":"                                                theme_name + theme_file"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_032f2088","line":335,"updated":"2017-08-30 17:23:29.000000000","message":"How about the following?\n\n  components \u003d theme_file.split(\u0027/\u0027)\n  try:\n    templates_index \u003d components.index(\u0027templates\u0027)\n    override_path \u003d \u0027/\u0027.join(componets[templates_index + 1:]\n  except ValueError:\n    # No \u0027templates\u0027 is included in the path of theme_file\n    \u003c\u003c\u003c some error handling \u003e\u003e\u003e","commit_id":"c1856b7a6dd3d92bdc5109fac3ab460ce9404914"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"5d0d5228be76ddf9bf733e4a2ccc26885c5270b3","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":333,"context_line":"            override_path \u003d os.path.join("},{"line_number":334,"context_line":"                *[x for x in os.path.split(theme_file)"},{"line_number":335,"context_line":"                  if x not in [\u0027/tempates\u0027, \u0027templates\u0027]])"},{"line_number":336,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":337,"context_line":"                                                theme_name + theme_file"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_313ed8c0","line":335,"in_reply_to":"7f287b81_032f2088","updated":"2017-08-31 07:02:06.000000000","message":"Why? What\u0027s wrong with os.path.split()? It is a path we want to split.","commit_id":"c1856b7a6dd3d92bdc5109fac3ab460ce9404914"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"fc8422d9170b82111be0fea529da27a1fddd8215","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            #        help-panel/help-panel.html\u0027"},{"line_number":333,"context_line":"            override_path \u003d os.path.join("},{"line_number":334,"context_line":"                *[x for x in os.path.split(theme_file)"},{"line_number":335,"context_line":"                  if x not in [\u0027/tempates\u0027, \u0027templates\u0027]])"},{"line_number":336,"context_line":"            template_overrides[override_path] \u003d \u0027themes/\u0027 + \\"},{"line_number":337,"context_line":"                                                theme_name + theme_file"},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_b14e4894","line":335,"in_reply_to":"7f287b81_313ed8c0","updated":"2017-08-31 07:36:59.000000000","message":"Is this the result you expect? http://paste.openstack.org/show/619981/\n\nos.path.split [1] returns a tuple of (head, tail).\n\nI cannot understand why this solves the problem.\n\n[1] https://docs.python.org/3.6/library/os.path.html#os.path.split","commit_id":"c1856b7a6dd3d92bdc5109fac3ab460ce9404914"}]}
