)]}'
{"swift/common/constraints.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"c0967bd08e9a025bcbc281116705ad3f1e4b972f","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            raise ValueError(\u0027%s is not mounted\u0027 % path)"},{"line_number":271,"context_line":"    else:"},{"line_number":272,"context_line":"        if not isdir(path):"},{"line_number":273,"context_line":"            raise ValueError(\u0027%s is not a dir\u0027 % path)"},{"line_number":274,"context_line":"    return path"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_e1bbbd0b","line":273,"updated":"2017-12-28 18:33:10.000000000","message":"You kept the \"dir\", I see. You know how they asked Thompson what was the one thing he would\u0027ve changed in UNIX if he could. He said, \"I would\u0027ve spelled creat(2) with \u0027e\u0027\".","commit_id":"4f5b6bff514458f04a374fa552fb06f73bf691fb"}],"swift/common/middleware/recon.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"c0967bd08e9a025bcbc281116705ad3f1e4b972f","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            except OSError as err:"},{"line_number":214,"context_line":"                mounted \u003d str(err)"},{"line_number":215,"context_line":"            except ValueError:"},{"line_number":216,"context_line":"                mounted \u003d False"},{"line_number":217,"context_line":"            else:"},{"line_number":218,"context_line":"                continue"},{"line_number":219,"context_line":"            mountlist.append({\u0027device\u0027: entry, \u0027mounted\u0027: mounted})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_21476520","line":216,"updated":"2017-12-28 18:33:10.000000000","message":"Yeah, let\u0027s stay compatible, even though we have a message now.","commit_id":"4f5b6bff514458f04a374fa552fb06f73bf691fb"}],"swift/container/updater.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"3ea9c4c1dbd73a9e81744b19d5a5099c956c955e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            try:"},{"line_number":105,"context_line":"                dev_path \u003d check_drive(self.devices, device, self.mount_check)"},{"line_number":106,"context_line":"            except ValueError as err:"},{"line_number":107,"context_line":"                self.logger.warning(err)"},{"line_number":108,"context_line":"                continue"},{"line_number":109,"context_line":"            con_path \u003d os.path.join(dev_path, DATADIR)"},{"line_number":110,"context_line":"            if not os.path.exists(con_path):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_498c2035","line":107,"updated":"2018-01-19 05:53:31.000000000","message":"This is minor, but I\u0027m not liking this style. See, we check device name that is derived from URL, don\u0027t we? We\u0027re well behind proxy, so this is not likely, but... what if someone cunning manages to stuff some meta characters (like \u0027%\u0027) in here? Maybe not now, but in the future? This is going to end in a traceback because of not having the argument for format. Not fatal, but annoying. I would prefer this sanitized somehow... Like  logger.warning(\"%s\", err). Agree/disagree?","commit_id":"993ec318929f544e15e335e02e54a3fa09d44cc8"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"89888411031a17ad7b9c17dba8aeeac41569526c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            try:"},{"line_number":105,"context_line":"                dev_path \u003d check_drive(self.devices, device, self.mount_check)"},{"line_number":106,"context_line":"            except ValueError as err:"},{"line_number":107,"context_line":"                self.logger.warning(err)"},{"line_number":108,"context_line":"                continue"},{"line_number":109,"context_line":"            con_path \u003d os.path.join(dev_path, DATADIR)"},{"line_number":110,"context_line":"            if not os.path.exists(con_path):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_933d2bdf","line":107,"in_reply_to":"7f96bb07_208cfb7d","updated":"2018-01-23 00:15:06.000000000","message":"I think Pete is pointing out the absence of a format string, like logger.warning(\"%s\", err) has. If a \"%\" slips into the stringification of err somehow, this\u0027ll crash.","commit_id":"993ec318929f544e15e335e02e54a3fa09d44cc8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b191ff136eed07edbe240ae3b10ad3f55ca78aa","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            try:"},{"line_number":105,"context_line":"                dev_path \u003d check_drive(self.devices, device, self.mount_check)"},{"line_number":106,"context_line":"            except ValueError as err:"},{"line_number":107,"context_line":"                self.logger.warning(err)"},{"line_number":108,"context_line":"                continue"},{"line_number":109,"context_line":"            con_path \u003d os.path.join(dev_path, DATADIR)"},{"line_number":110,"context_line":"            if not os.path.exists(con_path):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_208cfb7d","line":107,"in_reply_to":"7f96bb07_498c2035","updated":"2018-01-22 23:03:07.000000000","message":"\u003e This is going to end in a traceback because of not having the argument for format.\n\nHuh? The exception doesn\u0027t carry around the stack frames, as I recall... at any rate, the logger only includes the stack if you pass in exc_info (or use Logger.exception which automatically pulls it in for you):\n\n \u003e\u003e\u003e import logging\n \u003e\u003e\u003e logging.basicConfig(level\u003dlogging.DEBUG)\n \u003e\u003e\u003e try:\n ...     raise Exception(\u0027Oh no!\u0027)\n ... except Exception as e:\n ...     logging.warning(e)\n ...\n WARNING:root:Oh no!\n \u003e\u003e\u003e try:\n ...     raise Exception(\u0027Oh no!\u0027)\n ... except Exception as e:\n ...     logging.exception(e)\n ...\n ERROR:root:Oh no!\n Traceback (most recent call last):\n   File \"\u003cstdin\u003e\", line 2, in \u003cmodule\u003e\n Exception: Oh no!\n \u003e\u003e\u003e try:\n ...     raise Exception(\u0027Oh no!\u0027)\n ... except Exception as e:\n ...     logging.error(e)\n ...\n ERROR:root:Oh no!\n\nEven our crazy LogAdapter only does its manipulations in exception() I\u0027m pretty sure -- https://github.com/openstack/swift/blob/2.16.0/swift/common/utils.py#L1742-L1766","commit_id":"993ec318929f544e15e335e02e54a3fa09d44cc8"}],"swift/obj/replicator.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"3ea9c4c1dbd73a9e81744b19d5a5099c956c955e","unresolved":false,"context_lines":[{"line_number":595,"context_line":"                      failure_dev[\u0027device\u0027])"},{"line_number":596,"context_line":"                     for failure_dev in policy.object_ring.devs"},{"line_number":597,"context_line":"                     if failure_dev])"},{"line_number":598,"context_line":"                self.logger.warning(err)"},{"line_number":599,"context_line":"                continue"},{"line_number":600,"context_line":"            obj_path \u003d join(dev_path, data_dir)"},{"line_number":601,"context_line":"            tmp_path \u003d join(dev_path, get_tmp_dir(policy))"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_49918046","line":598,"updated":"2018-01-19 05:53:31.000000000","message":"same","commit_id":"993ec318929f544e15e335e02e54a3fa09d44cc8"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"3ea9c4c1dbd73a9e81744b19d5a5099c956c955e","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                    self._add_failure_stats([(failure_dev[\u0027replication_ip\u0027],"},{"line_number":738,"context_line":"                                              failure_dev[\u0027device\u0027])"},{"line_number":739,"context_line":"                                             for failure_dev in job[\u0027nodes\u0027]])"},{"line_number":740,"context_line":"                    self.logger.warning(err)"},{"line_number":741,"context_line":"                    continue"},{"line_number":742,"context_line":"                if self.handoffs_first and not job[\u0027delete\u0027]:"},{"line_number":743,"context_line":"                    # in handoffs first mode, we won\u0027t process primary"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_c9a4b0a8","line":740,"updated":"2018-01-19 05:53:31.000000000","message":"same","commit_id":"993ec318929f544e15e335e02e54a3fa09d44cc8"}],"swift/obj/updater.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2e85125f28b22575f356476ca17cbcc198b05fe4","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        for asyncdir in self._listdir(device):"},{"line_number":166,"context_line":"            # we only care about directories"},{"line_number":167,"context_line":"            async_pending \u003d os.path.join(device, asyncdir)"},{"line_number":168,"context_line":"            if not asyncdir.startswith(ASYNCDIR_BASE):"},{"line_number":169,"context_line":"                # skip stuff like \"accounts\", \"containers\", etc."},{"line_number":170,"context_line":"                continue"},{"line_number":171,"context_line":"            if not os.path.isdir(async_pending):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf8cb3f7_ae1d47be","line":168,"updated":"2017-12-27 21:10:54.000000000","message":"Oh yeah, and a little drive-by improvement here, to skip an unnecessary stat() call.","commit_id":"4f5b6bff514458f04a374fa552fb06f73bf691fb"}]}
