)]}'
{"nova/tests/unit/virt/disk/vfs/fakeguestfs.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1faa779486bfb5e58cfcb0cbb4d7a8849b50656a","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def write(self, path, content):"},{"line_number":115,"context_line":"        if not isinstance(content, bytes):"},{"line_number":116,"context_line":"            raise ValueError"},{"line_number":117,"context_line":"        if path not in self.files:"},{"line_number":118,"context_line":"            self.files[path] \u003d {"},{"line_number":119,"context_line":"                \"isdir\": False,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_89a2c5fb","line":116,"updated":"2020-06-08 10:49:24.000000000","message":"nit: TypeError would be a bit more correct","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1faa779486bfb5e58cfcb0cbb4d7a8849b50656a","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        if path not in self.files:"},{"line_number":132,"context_line":"            self.files[path] \u003d {"},{"line_number":133,"context_line":"                \"isdir\": False,"},{"line_number":134,"context_line":"                \"content\": b\"Hello World\","},{"line_number":135,"context_line":"                \"gid\": 100,"},{"line_number":136,"context_line":"                \"uid\": 100,"},{"line_number":137,"context_line":"                \"mode\": 0o700"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_c9ab1dd5","line":134,"updated":"2020-06-08 10:49:24.000000000","message":"ditto","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"}],"nova/virt/disk/api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"928960a79f6cf2824eff617ebe5663a5e0582623","unresolved":false,"context_lines":[{"line_number":492,"context_line":"def _inject_metadata_into_fs(metadata, fs):"},{"line_number":493,"context_line":"    LOG.debug(\"Inject metadata fs\u003d%(fs)s metadata\u003d%(metadata)s\","},{"line_number":494,"context_line":"              {\u0027fs\u0027: fs, \u0027metadata\u0027: metadata})"},{"line_number":495,"context_line":"    _inject_file_into_fs(fs, \u0027meta.js\u0027, jsonutils.dumps(metadata).encode())"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"def _setup_selinux_for_keys(fs, sshdir):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_e3a56049","line":495,"updated":"2020-06-08 08:51:55.000000000","message":"the other way.\n\nInstead of passing bytes to _inject_file_into_fs(), you should just pass strings and then encoding to bytes when you need.","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"928960a79f6cf2824eff617ebe5663a5e0582623","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    LOG.debug(\"Inject admin password fs\u003d%(fs)s \""},{"line_number":588,"context_line":"              \"admin_passwd\u003d\u003cSANITIZED\u003e\", {\u0027fs\u0027: fs})"},{"line_number":589,"context_line":"    admin_user \u003d b\u0027root\u0027"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    passwd_path \u003d os.path.join(\u0027etc\u0027, \u0027passwd\u0027)"},{"line_number":592,"context_line":"    shadow_path \u003d os.path.join(\u0027etc\u0027, \u0027shadow\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_636f90fc","line":589,"updated":"2020-06-08 08:51:55.000000000","message":"again, same concern.\n\nWe shouldn\u0027t pass bytes to other methods, _set_passwd() should encode the strings when it needs.","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1faa779486bfb5e58cfcb0cbb4d7a8849b50656a","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    LOG.debug(\"Inject admin password fs\u003d%(fs)s \""},{"line_number":588,"context_line":"              \"admin_passwd\u003d\u003cSANITIZED\u003e\", {\u0027fs\u0027: fs})"},{"line_number":589,"context_line":"    admin_user \u003d b\u0027root\u0027"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    passwd_path \u003d os.path.join(\u0027etc\u0027, \u0027passwd\u0027)"},{"line_number":592,"context_line":"    shadow_path \u003d os.path.join(\u0027etc\u0027, \u0027shadow\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_495f0d75","line":589,"in_reply_to":"ff570b3c_636f90fc","updated":"2020-06-08 10:49:24.000000000","message":"I tend to agree with Sylvain here. One catch though is that _set_passwd() formal arguments would be asymmetrical:\n\n_set_passwd(username: str, admin_passwd: str, passwd_data: byte, shadow_data: byte)\n\nSo please properly document what type these function takes and returns","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"}],"nova/virt/disk/vfs/api.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1faa779486bfb5e58cfcb0cbb4d7a8849b50656a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\""},{"line_number":106,"context_line":"        pass"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def append_file(self, path, content):"},{"line_number":109,"context_line":"        \"\"\"Appends @content to the end of the file."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        Append @content to the end of the file identified by @path, creating"},{"line_number":112,"context_line":"        the file if it does not already exist."},{"line_number":113,"context_line":"        \"\"\""},{"line_number":114,"context_line":"        pass"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def replace_file(self, path, content):"},{"line_number":117,"context_line":"        \"\"\"Replaces contents of the file."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        Replace the entire contents of the file identified by @path, with"},{"line_number":120,"context_line":"        @content, creating the file if it does not already exist."},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        pass"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def read_file(self, path):"},{"line_number":125,"context_line":"        \"\"\"Returns the entire contents of the file identified by @path.\"\"\""},{"line_number":126,"context_line":"        pass"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def has_file(self, path):"},{"line_number":129,"context_line":"        \"\"\"Returns a True if the file identified by @path exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_69d3f1d6","line":126,"range":{"start_line":108,"start_character":0,"end_line":126,"end_character":12},"updated":"2020-06-08 10:49:24.000000000","message":"I suggest to update the documentation of these methods with type information","commit_id":"7360712fc8b82b91abb6022fc7c8ba392eda1930"}]}
