)]}'
{"trove/guestagent/common/operating_system.py":[{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"5d8340659438a4cbeee122ae10c458201d3a6c71","unresolved":false,"context_lines":[{"line_number":26,"context_line":"DEBIAN \u003d \u0027debian\u0027"},{"line_number":27,"context_line":"SUSE \u003d \u0027suse\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Octal representations of common modes."},{"line_number":30,"context_line":"ALL_FULL \u003d stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO  # 0777"},{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_d90bb37c","line":29,"updated":"2015-04-06 14:54:29.000000000","message":"Wouldn\u0027t it be better to make these class methods of the Modes class (which I would suggest renaming FileMode).\n\nThen instead of GRP_RW \u003d operating_system.Modes(add\u003d[GRP_RW])\n\nyou could:\n\nfrom operating_system import chmod, FileMode\n\nchmod(file, FileMode.GROUP_RW)","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"5475050260362a858c801b400532be7bbaa4410f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"DEBIAN \u003d \u0027debian\u0027"},{"line_number":27,"context_line":"SUSE \u003d \u0027suse\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Octal representations of common modes."},{"line_number":30,"context_line":"ALL_FULL \u003d stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO  # 0777"},{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_329bd1cb","line":29,"in_reply_to":"9aa53dc9_d90bb37c","updated":"2015-04-06 17:27:39.000000000","message":"I think the problem here is that GROUP_RW mode can be \u0027added\u0027, \u0027removed\u0027 or \u0027set\u0027.\nWe could have FileMode.add() which would return the \u0027additive\u0027 version of the mode, but maybe the best solution would be to remove the Modes class altogether and pass three optional lists of octal flags to the chmod function instead.\nThat would make the interface more closer to the shell command.","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"8370a728c5248c8d5740c73e90eb3d568fb64560","unresolved":false,"context_lines":[{"line_number":26,"context_line":"DEBIAN \u003d \u0027debian\u0027"},{"line_number":27,"context_line":"SUSE \u003d \u0027suse\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Octal representations of common modes."},{"line_number":30,"context_line":"ALL_FULL \u003d stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO  # 0777"},{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_f259e98f","line":29,"in_reply_to":"9aa53dc9_d90bb37c","updated":"2015-04-06 17:39:37.000000000","message":"This encapsulation of modes is probably not really necessary - efectively it is just a struct of three octal numbers...\n\nchmod(path, reset\u003dNone, add\u003dNone, remove\u003dNone,...) would probably be closer to the shell version \"chmod \u003d\u003cmode to set\u003e,+\u003cmode to add\u003e,-\u003cmode to remove\u003e path\"\n\nThe interface will be responsible for proper summation of the given modes.","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a876fef8d11fa23529bb1aa5900472dbce1fd696","unresolved":false,"context_lines":[{"line_number":26,"context_line":"DEBIAN \u003d \u0027debian\u0027"},{"line_number":27,"context_line":"SUSE \u003d \u0027suse\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Octal representations of common modes."},{"line_number":30,"context_line":"ALL_FULL \u003d stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO  # 0777"},{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_68f2929c","line":29,"in_reply_to":"9aa53dc9_d90bb37c","updated":"2015-04-06 15:32:27.000000000","message":"You are right, will do that. I originally had the Modes mutable and did not want anybody to accidentally change a shared one...","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"5d8340659438a4cbeee122ae10c458201d3a6c71","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# Octal representations of common modes."},{"line_number":30,"context_line":"ALL_FULL \u003d stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO  # 0777"},{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"},{"line_number":33,"context_line":"GRP_RW \u003d stat.S_IRGRP | stat.S_IWGRP  # 060"},{"line_number":34,"context_line":"G_RW_O_R \u003d GRP_RW | stat.S_IROTH  # 064"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_d9561306","line":32,"updated":"2015-04-06 14:54:29.000000000","message":"Maybe we could call this GRP_RW_OTHR_R, or for the few extra vowels and added clarity GROUP_RW_OTHER_R","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"5d8340659438a4cbeee122ae10c458201d3a6c71","unresolved":false,"context_lines":[{"line_number":31,"context_line":"ALL_READ \u003d stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH  # 0444"},{"line_number":32,"context_line":"U_RW_G_R \u003d stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP  # 0640"},{"line_number":33,"context_line":"GRP_RW \u003d stat.S_IRGRP | stat.S_IWGRP  # 060"},{"line_number":34,"context_line":"G_RW_O_R \u003d GRP_RW | stat.S_IROTH  # 064"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class Modes(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_19747b9a","line":34,"updated":"2015-04-06 14:54:29.000000000","message":"Likewise GRP_RW_OTHR_R","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"41b8ccad663e0d262ba11aefceacd0d45f7903ad","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def chmod(path, modes, recursive\u003dTrue, force\u003dFalse, **kwargs):"},{"line_number":203,"context_line":"    \"\"\"Changes the mode of a given file (by default as root)."},{"line_number":204,"context_line":"    The call is a no-op if no modes are provided."},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    :seealso: Modes for more information on the representation of modes."},{"line_number":207,"context_line":"    :seealso: _execute_shell_cmd for valid optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_b45b562e","line":204,"updated":"2015-04-06 15:07:55.000000000","message":"Shouldn\u0027t that be some sort of coding exception?  Why would anyone intentionally do that?","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"41b8ccad663e0d262ba11aefceacd0d45f7903ad","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    if path:"},{"line_number":227,"context_line":"        if modes and modes.has_any():"},{"line_number":228,"context_line":"            options \u003d collections.OrderedDict([(\u0027f\u0027, force), (\u0027R\u0027, recursive)])"},{"line_number":229,"context_line":"            shell_modes \u003d _build_shell_chmod_modes(modes)"},{"line_number":230,"context_line":"            _execute_shell_cmd(\u0027chmod\u0027, options, shell_modes, path, **kwargs)"},{"line_number":231,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_348d067c","line":228,"updated":"2015-04-06 15:07:55.000000000","message":"Why OrderedDict?","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"41b8ccad663e0d262ba11aefceacd0d45f7903ad","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    :returns: Following string for any non-empty modes:"},{"line_number":246,"context_line":"              \u0027\u003d\u003creset mode\u003e,+\u003cadd mode\u003e,-\u003cremove mode\u003e\u0027"},{"line_number":247,"context_line":"    \"\"\""},{"line_number":248,"context_line":"    text_modes \u003d collections.OrderedDict([(\u0027\u003d\u0027, modes.get_reset_mode()),"},{"line_number":249,"context_line":"                                          (\u0027+\u0027, modes.get_add_mode()),"},{"line_number":250,"context_line":"                                          (\u0027-\u0027, modes.get_remove_mode())])"},{"line_number":251,"context_line":"    return \u0027,\u0027.join("}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_f43b1e9b","line":248,"updated":"2015-04-06 15:07:55.000000000","message":"Again, why OrderedDict?  Wouldn\u0027t a list of tuples do the same thing and be clearer?","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a876fef8d11fa23529bb1aa5900472dbce1fd696","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    :returns: Following string for any non-empty modes:"},{"line_number":246,"context_line":"              \u0027\u003d\u003creset mode\u003e,+\u003cadd mode\u003e,-\u003cremove mode\u003e\u0027"},{"line_number":247,"context_line":"    \"\"\""},{"line_number":248,"context_line":"    text_modes \u003d collections.OrderedDict([(\u0027\u003d\u0027, modes.get_reset_mode()),"},{"line_number":249,"context_line":"                                          (\u0027+\u0027, modes.get_add_mode()),"},{"line_number":250,"context_line":"                                          (\u0027-\u0027, modes.get_remove_mode())])"},{"line_number":251,"context_line":"    return \u0027,\u0027.join("}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_6881728f","line":248,"in_reply_to":"9aa53dc9_f43b1e9b","updated":"2015-04-06 15:32:27.000000000","message":"The ordered dict is solely for tests. The unit tests assume certain order of flags. Dict does not have a guaranteed iteration order.\nSure we could use a list, but that would allow duplicate keys. Dict seems more natural in this case.","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"765b2ea7e374f1ec1f9540d77640187fbafadbd1","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        raise exception.UnprocessableEntity("},{"line_number":161,"context_line":"            _(\"No file modes specified.\"))"},{"line_number":162,"context_line":"    else:"},{"line_number":163,"context_line":"        options \u003d collections.OrderedDict([(\u0027f\u0027, force), (\u0027R\u0027, recursive)])"},{"line_number":164,"context_line":"        shell_modes \u003d _build_shell_chmod_modes(reset, add, remove)"},{"line_number":165,"context_line":"        _execute_shell_cmd(\u0027chmod\u0027, options, shell_modes, path, **kwargs)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa53dc9_894a5482","line":163,"updated":"2015-04-07 13:06:20.000000000","message":"Why does this need to be a dict at all?  You incur the ovehead of a dict, but you never actually use it as a dict (i.e., you never access it by key).","commit_id":"246e2a95e982e8d9f46a8d39a3254b25fc8089cb"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"765b2ea7e374f1ec1f9540d77640187fbafadbd1","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    :returns: Following string for any non-empty modes:"},{"line_number":183,"context_line":"              \u0027\u003d\u003creset mode\u003e,+\u003cadd mode\u003e,-\u003cremove mode\u003e\u0027"},{"line_number":184,"context_line":"    \"\"\""},{"line_number":185,"context_line":"    text_modes \u003d collections.OrderedDict([(\u0027\u003d\u0027, _combine_modes(reset)),"},{"line_number":186,"context_line":"                                          (\u0027+\u0027, _combine_modes(add)),"},{"line_number":187,"context_line":"                                          (\u0027-\u0027, _combine_modes(remove))])"},{"line_number":188,"context_line":"    return \u0027,\u0027.join("}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa53dc9_49dd6c41","line":185,"updated":"2015-04-07 13:06:20.000000000","message":"in this case, you only use the iterable in the very next line.  Why incur the overhead of a dict, especially one with a less efficient implementation to maintain order?","commit_id":"246e2a95e982e8d9f46a8d39a3254b25fc8089cb"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"ad7d79d9eeafe2276f11848eae5a71deb53bd1a6","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                               run_as_root\u003dTrue, root_helper\u003d\"sudo\")"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def chmod(path, reset\u003dNone, add\u003dNone, remove\u003dNone, recursive\u003dTrue, force\u003dFalse,"},{"line_number":120,"context_line":"          **kwargs):"},{"line_number":121,"context_line":"    \"\"\"Changes the mode of a given file (by default as root)."},{"line_number":122,"context_line":"    The way the modes get applied is generally controlled by the operation"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa53dc9_8bb56cef","line":119,"updated":"2015-04-08 15:52:38.000000000","message":"This signature is way too complex for chmod.  THe way you had it originally was better.  All I wanted you to do was make some default modes in the mode class.","commit_id":"5b6f3d1cb98c08937b90c44c66ba3058e87d130f"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"700da928d8bbf843556768be5afcd3ff4482ff8a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                    cls(None, None, modes))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def __init__(self, reset\u003dNone, add\u003dNone, remove\u003dNone):"},{"line_number":65,"context_line":"        self.__reset \u003d list(reset) if reset is not None else []"},{"line_number":66,"context_line":"        self.__add \u003d list(add) if add is not None else []"},{"line_number":67,"context_line":"        self.__remove \u003d list(remove) if remove is not None else []"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_fd74fccf","line":65,"updated":"2015-04-13 14:59:13.000000000","message":"Is there a reason you\u0027re using double underscore rather than single?  The convention for user code is single underscores for private attributes.  Double underscores are usually for python builtins.","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"700da928d8bbf843556768be5afcd3ff4482ff8a","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def __repr__(self):"},{"line_number":109,"context_line":"        args \u003d []"},{"line_number":110,"context_line":"        if self.has_any():"},{"line_number":111,"context_line":"            if self.__reset:"},{"line_number":112,"context_line":"                args.append(\u0027reset\u003d[{:o}]\u0027.format(self.get_reset_mode()))"},{"line_number":113,"context_line":"            if self.__add:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_9863c61a","line":110,"updated":"2015-04-13 14:59:13.000000000","message":"I think this if is redundant.","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"b8df6f8b411d28c71e8cc3f24ab43d358c64bc7d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        args \u003d []"},{"line_number":110,"context_line":"        if self.has_any():"},{"line_number":111,"context_line":"            if self.__reset:"},{"line_number":112,"context_line":"                args.append(\u0027reset\u003d[{:o}]\u0027.format(self.get_reset_mode()))"},{"line_number":113,"context_line":"            if self.__add:"},{"line_number":114,"context_line":"                args.append(\u0027add\u003d[{:o}]\u0027.format(self.get_add_mode()))"},{"line_number":115,"context_line":"            if self.__remove:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_fabbd40c","line":112,"updated":"2015-04-13 18:39:53.000000000","message":"Your format should probably be :03o","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"a43506765f22d2e027b3a096e131b61f45c9bdaf","unresolved":false,"context_lines":[{"line_number":265,"context_line":"         if item[1]])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"def remove(path, force\u003dFalse, recursive\u003dTrue, **kwargs):"},{"line_number":269,"context_line":"    \"\"\"Remove a given file or directory (by default as root)."},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    :seealso: _execute_shell_cmd for valid optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_38ccc034","line":268,"updated":"2015-04-13 07:49:07.000000000","message":"recursive should be by default false, which is the default behavior of os command \"rm\"","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"700da928d8bbf843556768be5afcd3ff4482ff8a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"         if item[1]])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"def remove(path, force\u003dFalse, recursive\u003dTrue, **kwargs):"},{"line_number":269,"context_line":"    \"\"\"Remove a given file or directory (by default as root)."},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    :seealso: _execute_shell_cmd for valid optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_fd6f5c90","line":268,"in_reply_to":"7aaa499b_38ccc034","updated":"2015-04-13 14:59:13.000000000","message":"I don\u0027t see that it follows that because the rm(1) command doesn\u0027t run recursively by default, which is only so because rm didn\u0027t originally work recursively at all, it necessarily follows that our os.remove command shouldn\u0027t.  I\u0027m sure many implementations of rm/del/delete/remove do work recursively by default.","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"a43506765f22d2e027b3a096e131b61f45c9bdaf","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"def _execute_shell_cmd(cmd, options, *args, **kwargs):"},{"line_number":293,"context_line":"    \"\"\"Execute a given shell command (by default as root) passing it"},{"line_number":294,"context_line":"    given options (flags) and arguments."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    Takes optional keyword arguments:"},{"line_number":297,"context_line":"    :param run_as_root:      Execute as root (default)."}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_384f2094","line":294,"updated":"2015-04-13 07:49:07.000000000","message":"so run_as_root should not be a default option, something which utils.execute also follows, that if you want to run a command as root you should explicitly say that run this command as root.","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"700da928d8bbf843556768be5afcd3ff4482ff8a","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"def _execute_shell_cmd(cmd, options, *args, **kwargs):"},{"line_number":293,"context_line":"    \"\"\"Execute a given shell command (by default as root) passing it"},{"line_number":294,"context_line":"    given options (flags) and arguments."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    Takes optional keyword arguments:"},{"line_number":297,"context_line":"    :param run_as_root:      Execute as root (default)."}],"source_content_type":"text/x-python","patch_set":5,"id":"7aaa499b_fdf63cd6","line":294,"in_reply_to":"7aaa499b_384f2094","updated":"2015-04-13 14:59:13.000000000","message":"Sushil\u0027s comment is reasonable.  I can\u0027t imagine anyone ever doing run_as_root\u003dfalse, so you\u0027re effectively defeating the whole user permissions mechanism.","commit_id":"873c6001024fa24a704d51ea5a18af10ee56d892"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"38088d3b3f2be8e0a81c683e5b6c2b1a0e2bb8d5","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        exec_args[\u0027root_helper\u0027] \u003d \u0027sudo\u0027"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    if \u0027timeout\u0027 in kwargs:"},{"line_number":317,"context_line":"        exec_args[\u0027timeout\u0027] \u003d kwargs.pop(\u0027timeout\u0027)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    cmd_flags \u003d _build_command_options(options)"},{"line_number":320,"context_line":"    cmd_args \u003d cmd_flags + list(args)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7aaa499b_2929a6e6","line":317,"updated":"2015-04-15 17:01:16.000000000","message":"You\u0027ve made a contract here with the kwargs (since you don\u0027t pass them through).  We should notify of any \u0027extra\u0027 args passed in, like is done in oslo\u0027s execute.","commit_id":"fc6a533721b98373649505f61fec414b51d64b28"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"6fcc6d77051714ba2a6b8c30dd53791d31d71fba","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @classmethod"},{"line_number":61,"context_line":"    def SET_FULL(cls):"},{"line_number":62,"context_line":"        return cls(reset\u003d[stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO])  # 0777"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def ADD_READ_ALL(cls):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aa745d1_a3b8bee6","line":62,"updated":"2015-04-15 19:46:48.000000000","message":"If you respin, maybe make the comment:\n\n  # \u003d0777","commit_id":"a092e2e2a627d41fc15394548b30e763b6432534"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"6fcc6d77051714ba2a6b8c30dd53791d31d71fba","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def ADD_READ_ALL(cls):"},{"line_number":66,"context_line":"        return cls(add\u003d[stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH])  # 0444"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def ADD_GRP_RW(cls):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aa745d1_83cee281","line":66,"updated":"2015-04-15 19:46:48.000000000","message":"ditto:\n\n  # +0444","commit_id":"a092e2e2a627d41fc15394548b30e763b6432534"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"6fcc6d77051714ba2a6b8c30dd53791d31d71fba","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def ADD_GRP_RW(cls):"},{"line_number":70,"context_line":"        return cls(add\u003d[stat.S_IRGRP | stat.S_IWGRP])  # 060"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def SET_GRP_RW_OTH_R(cls):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aa745d1_23c5ce5a","line":70,"updated":"2015-04-15 19:46:48.000000000","message":"ditto:\n\n  # +0060","commit_id":"a092e2e2a627d41fc15394548b30e763b6432534"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"6fcc6d77051714ba2a6b8c30dd53791d31d71fba","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def SET_GRP_RW_OTH_R(cls):"},{"line_number":74,"context_line":"        return cls(reset\u003d[stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH])  # 064"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def __init__(self, reset\u003dNone, add\u003dNone, remove\u003dNone):"},{"line_number":77,"context_line":"        self._reset \u003d list(reset) if reset is not None else []"}],"source_content_type":"text/x-python","patch_set":13,"id":"5aa745d1_03a1b2a9","line":74,"updated":"2015-04-15 19:46:48.000000000","message":"ditto:\n\n  # \u003d0064\n\nAlso might make sense to group the \u0027SET_*\u0027 together. i.e. put this method after SET_FULL","commit_id":"a092e2e2a627d41fc15394548b30e763b6432534"}],"trove/guestagent/datastore/experimental/postgresql/pgutil.py":[{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"41b8ccad663e0d262ba11aefceacd0d45f7903ad","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        for line in file_handle:"},{"line_number":56,"context_line":"            if line !\u003d \"\":"},{"line_number":57,"context_line":"                yield line.split(\u0027,\u0027)"},{"line_number":58,"context_line":"    operating_system.remove(\"{filename}\".format(filename\u003dfilename),"},{"line_number":59,"context_line":"                            run_as_root\u003dFalse)"},{"line_number":60,"context_line":"    raise StopIteration()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_34aaa671","line":58,"updated":"2015-04-06 15:07:55.000000000","message":"Why the extra format here?  It uses the filename directly above.","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"a876fef8d11fa23529bb1aa5900472dbce1fd696","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        for line in file_handle:"},{"line_number":56,"context_line":"            if line !\u003d \"\":"},{"line_number":57,"context_line":"                yield line.split(\u0027,\u0027)"},{"line_number":58,"context_line":"    operating_system.remove(\"{filename}\".format(filename\u003dfilename),"},{"line_number":59,"context_line":"                            run_as_root\u003dFalse)"},{"line_number":60,"context_line":"    raise StopIteration()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa53dc9_a87c1a21","line":58,"in_reply_to":"9aa53dc9_34aaa671","updated":"2015-04-06 15:32:27.000000000","message":"I just wanted to stick with the original code. But, you are right, this is really unnecessary.","commit_id":"d8bfda69e0cf7e399ab3d5194240b5aea0cb7879"}]}
