)]}'
{"oslo_policy/_cache_handler.py":[{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"850e151f4ae3f9c35f5497c0218b89e860d42e7d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        msg \u003d err.strerror"},{"line_number":42,"context_line":"        LOG.error(\u0027Config file not found %(filename)s: %(msg)s\u0027,"},{"line_number":43,"context_line":"                  {\u0027filename\u0027: filename, \u0027msg\u0027: msg})"},{"line_number":44,"context_line":"        raise cfg.ConfigFilesNotFoundError((filename,))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    cache_info \u003d cache.setdefault(filename, {})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_a176dbd7","line":44,"range":{"start_line":44,"start_character":14,"end_line":44,"end_character":55},"updated":"2019-09-19 05:02:44.000000000","message":"IMO, if policy_file is deleted by operator, it means operator wants to revert its policy to default. So, how about returning (True, {}) instead of raise?","commit_id":"f2d548eaca03a1419b8fe0b4b02bd6bd3acf74f5"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"6c62a0f50dcb3de46277a70e8784730e08e2d7a7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        msg \u003d err.strerror"},{"line_number":42,"context_line":"        LOG.error(\u0027Config file not found %(filename)s: %(msg)s\u0027,"},{"line_number":43,"context_line":"                  {\u0027filename\u0027: filename, \u0027msg\u0027: msg})"},{"line_number":44,"context_line":"        raise cfg.ConfigFilesNotFoundError((filename,))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    cache_info \u003d cache.setdefault(filename, {})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_10be35b3","line":44,"range":{"start_line":44,"start_character":14,"end_line":44,"end_character":55},"in_reply_to":"3fa7e38b_a176dbd7","updated":"2020-12-16 10:08:54.000000000","message":"why not","commit_id":"f2d548eaca03a1419b8fe0b4b02bd6bd3acf74f5"}],"oslo_policy/tests/test_cache_handler.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e11299abb4b4e685793d70fb4447875e7d749d40","unresolved":true,"context_lines":[{"line_number":72,"context_line":"        myfile \u003d \"{tmpdir}/tmpfile\".format(tmpdir\u003dtmpdir)"},{"line_number":73,"context_line":"        with open(myfile, \"w+\") as fp:"},{"line_number":74,"context_line":"            fp.write(\"test\")"},{"line_number":75,"context_line":"        os.chmod(myfile, 000)"},{"line_number":76,"context_line":"        self.assertRaises(oslo_config.cfg.ConfigFilesPermissionDeniedError,"},{"line_number":77,"context_line":"                          _ch.read_cached_file, file_cache, myfile)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"b1f77bba_01c6bf66","line":75,"updated":"2021-02-09 11:01:55.000000000","message":"How do you clean this up after the test has run? You\u0027re not using the \u0027TempDir\u0027 fixture so I assume the answer is \"you don\u0027t\". If you tried, I assume you wouldn\u0027t be able to since the permissions prevent you doing so. It\u0027s not the biggest issue but wouldn\u0027t it be simpler to simply mock the \u0027builtins.open\u0027 function to raise the relevant \u0027PermissionError\u0027 exception?","commit_id":"0b8ec92533f38bce27300ac6e2f968a20d39c7e3"}]}
