)]}'
{"horizon/tables/base.py":[{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"2ef20bb88038c4e8e9f87c62c969ced1a8ebdcd2","unresolved":false,"context_lines":[{"line_number":1686,"context_line":"        but this can be overridden to return other values."},{"line_number":1687,"context_line":"        \"\"\""},{"line_number":1688,"context_line":"        try:"},{"line_number":1689,"context_line":"            return getattr(datum, \u0027name\u0027)"},{"line_number":1690,"context_line":"        except Exception:"},{"line_number":1691,"context_line":"            # NOTE(haypo): don\u0027t use hasattr() because it can raise TypeError"},{"line_number":1692,"context_line":"            # on Python 3"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_4a931a50","line":1689,"updated":"2016-02-02 16:49:38.000000000","message":"I think:\n\nreturn getattr(datum, \u0027name\u0027, None)\n\nis simpler since we aren\u0027t doing anything with the exception anyway","commit_id":"e097e2e3bfd73baa1b9912bf646ed53f801f7c31"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"6bce35e5327d152032be72f823ccd2e759767480","unresolved":false,"context_lines":[{"line_number":1686,"context_line":"        but this can be overridden to return other values."},{"line_number":1687,"context_line":"        \"\"\""},{"line_number":1688,"context_line":"        try:"},{"line_number":1689,"context_line":"            return getattr(datum, \u0027name\u0027)"},{"line_number":1690,"context_line":"        except Exception:"},{"line_number":1691,"context_line":"            # NOTE(haypo): don\u0027t use hasattr() because it can raise TypeError"},{"line_number":1692,"context_line":"            # on Python 3"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_44e786ac","line":1689,"in_reply_to":"7a5de9d1_4a931a50","updated":"2016-02-02 20:26:01.000000000","message":"hasattr() *and* getattr() changed in Python 3. You get the same error with getattr():\n\n  File \"/home/haypo/prog/openstack/horizon/horizon/tables/base.py\", line 1689, in get_object_display\n    return getattr(datum, \u0027name\u0027, None)\n  File \"/home/haypo/prog/openstack/horizon/.tox/py34/lib/python3.4/site-packages/keystoneclient/base.py\", line 494, in __getattr__\n    self.get()\n  File \"/home/haypo/prog/openstack/horizon/.tox/py34/lib/python3.4/site-packages/keystoneclient/base.py\", line 512, in get\n    new \u003d self.manager.get(self.id)\n TypeError: get() missing 1 required positional argument: \u0027identity_provider\u0027","commit_id":"e097e2e3bfd73baa1b9912bf646ed53f801f7c31"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"4a6ada9b4e3147572b6e07b8f6059c982e34c3c5","unresolved":false,"context_lines":[{"line_number":1688,"context_line":"        try:"},{"line_number":1689,"context_line":"            return getattr(datum, \u0027name\u0027)"},{"line_number":1690,"context_line":"        except Exception:"},{"line_number":1691,"context_line":"            # NOTE(haypo): don\u0027t use hasattr() because it can raise TypeError"},{"line_number":1692,"context_line":"            # on Python 3"},{"line_number":1693,"context_line":"            pass"},{"line_number":1694,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_cd93d859","line":1691,"updated":"2016-02-08 15:23:45.000000000","message":"I would remove this as its not really hasattr the one raisin the error but keystoneclient and their overriden  __getattr__","commit_id":"765469ce6f5d5c8ebde012c540949b316a3426f2"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"4a6ada9b4e3147572b6e07b8f6059c982e34c3c5","unresolved":false,"context_lines":[{"line_number":1690,"context_line":"        except Exception:"},{"line_number":1691,"context_line":"            # NOTE(haypo): don\u0027t use hasattr() because it can raise TypeError"},{"line_number":1692,"context_line":"            # on Python 3"},{"line_number":1693,"context_line":"            pass"},{"line_number":1694,"context_line":"        return None"},{"line_number":1695,"context_line":""},{"line_number":1696,"context_line":"    def has_prev_data(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_cdcc388b","line":1693,"updated":"2016-02-08 15:23:45.000000000","message":"instead of pass you can return None in here.","commit_id":"765469ce6f5d5c8ebde012c540949b316a3426f2"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"ca63b6ff1ec2ed83417c97cc15c29ab09b5172be","unresolved":false,"context_lines":[{"line_number":1688,"context_line":"        try:"},{"line_number":1689,"context_line":"            return getattr(datum, \u0027name\u0027)"},{"line_number":1690,"context_line":"        except Exception:"},{"line_number":1691,"context_line":"            return None"},{"line_number":1692,"context_line":""},{"line_number":1693,"context_line":"    def has_prev_data(self):"},{"line_number":1694,"context_line":"        \"\"\"Returns a boolean value indicating whether there is previous data"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_5e29c799","line":1691,"updated":"2016-02-08 19:01:17.000000000","message":"I am worried that hiding this would eventually make this harder to troubleshoot in the future since the exception is always consumed.\n\nI think we can fix it by following Timur\u0027s suggestion to pass None as argument to the Manager class in :\nhttps://review.openstack.org/#/c/256362/10/openstack_dashboard/test/test_data/keystone_data.py\n\nWhen the attribute is not found, this prevent further processing in and it would just raise an attribute error:\nhttps://github.com/openstack/python-keystoneclient/blob/16e834dd4597314d79cf4fb0bb98449e6552f804/keystoneclient/base.py#L509","commit_id":"2c5dbf5a293bdb7251bd704aadffb077a4bee51d"}]}
