)]}'
{"etc/heat/heat.conf.sample":[{"author":{"_account_id":7253,"name":"Jason Dunsmore","email":"jasondunsmore@gmail.com","username":"jbd"},"change_message_id":"24dfe103ca43c02159821095aae0d35b4771b94e","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"# catalog on token validation and will not set the X-Service-"},{"line_number":1002,"context_line":"# Catalog header. (boolean value)"},{"line_number":1003,"context_line":"#include_service_catalog\u003dtrue"},{"line_number":1004,"context_line":""},{"line_number":1005,"context_line":""},{"line_number":1006,"context_line":"[matchmaker_redis]"},{"line_number":1007,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAUH%2F%2FcZw%3D","line":1004,"updated":"2014-01-13 20:37:16.000000000","message":"pep8 was failing due to this bug:\nhttps://bugs.launchpad.net/heat/+bug/1268614\n\nI\u0027ll submit a fix separately in a moment.  Please remove the heat.conf.sample changes in this patch.","commit_id":"5b5c86d137707ba506776ce9abb39b5f7cc70133"}],"heat/engine/properties.py":[{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"366438b354250a3ff73517d6ac8a2ca67fd92607","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            value \u003d self.has_default() and self.default() or 0"},{"line_number":239,"context_line":"        if isinstance(value, basestring):"},{"line_number":240,"context_line":"            try:"},{"line_number":241,"context_line":"                value \u003d Schema.str_to_num(value)"},{"line_number":242,"context_line":"            except ValueError:"},{"line_number":243,"context_line":"                raise TypeError(_(\u0027can not convert string to number\u0027))"},{"line_number":244,"context_line":"        if not isinstance(value, (int, long)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgKs%3D","line":241,"updated":"2014-01-13 09:12:34.000000000","message":"Instead of using str_to_num, what do you think of simply calling int()? We don\u0027t care about float, and we could remove the isinstance check in all places. I\u0027m suggesting something like that: http://paste.openstack.org/show/61072/","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"90388ec5341309dec205fa0154260ad148abf153","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            value \u003d self.has_default() and self.default() or 0"},{"line_number":239,"context_line":"        if isinstance(value, basestring):"},{"line_number":240,"context_line":"            try:"},{"line_number":241,"context_line":"                value \u003d Schema.str_to_num(value)"},{"line_number":242,"context_line":"            except ValueError:"},{"line_number":243,"context_line":"                raise TypeError(_(\u0027can not convert string to number\u0027))"},{"line_number":244,"context_line":"        if not isinstance(value, (int, long)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FfdU%3D","line":241,"in_reply_to":"AAAAUH%2F%2FgGQ%3D","updated":"2014-01-13 11:17:18.000000000","message":"I have understood it now... I was confused, because in old version we had number \n(which may be float and int) and similar check was in integer:\n                      if not isinstance(value, (int, long)):\nThanks for the comment, that help me ;)","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"e1b941eb9dfa033116cbb3bc6eb56a659c921280","unresolved":false,"context_lines":[{"line_number":238,"context_line":"            value \u003d self.has_default() and self.default() or 0"},{"line_number":239,"context_line":"        if isinstance(value, basestring):"},{"line_number":240,"context_line":"            try:"},{"line_number":241,"context_line":"                value \u003d Schema.str_to_num(value)"},{"line_number":242,"context_line":"            except ValueError:"},{"line_number":243,"context_line":"                raise TypeError(_(\u0027can not convert string to number\u0027))"},{"line_number":244,"context_line":"        if not isinstance(value, (int, long)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgGQ%3D","line":241,"in_reply_to":"AAAAUH%2F%2FgKs%3D","updated":"2014-01-13 09:27:03.000000000","message":"Heh) I agree with you. \nI had some doubts about duplicate call str_to_num here and in _validate_number.\nI will fix it according your template.\nAlso could you explain, why do we not care about float?\nand what differences will be between _validate_integer and _validate_number, except for conversion to int (in _validate_integer) and conversion to int and float (in _validate_number instr_to_num ) ?","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"},{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"366438b354250a3ff73517d6ac8a2ca67fd92607","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            try:"},{"line_number":241,"context_line":"                value \u003d Schema.str_to_num(value)"},{"line_number":242,"context_line":"            except ValueError:"},{"line_number":243,"context_line":"                raise TypeError(_(\u0027can not convert string to number\u0027))"},{"line_number":244,"context_line":"        if not isinstance(value, (int, long)):"},{"line_number":245,"context_line":"            raise TypeError(_(\u0027value is not an integer\u0027))"},{"line_number":246,"context_line":"        return self._validate_number(value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgLo%3D","line":243,"updated":"2014-01-13 09:12:34.000000000","message":"Please capitalize the message, and put \u0027%s\u0027 % value somewhere to make it more clear.","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"e1b941eb9dfa033116cbb3bc6eb56a659c921280","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            try:"},{"line_number":241,"context_line":"                value \u003d Schema.str_to_num(value)"},{"line_number":242,"context_line":"            except ValueError:"},{"line_number":243,"context_line":"                raise TypeError(_(\u0027can not convert string to number\u0027))"},{"line_number":244,"context_line":"        if not isinstance(value, (int, long)):"},{"line_number":245,"context_line":"            raise TypeError(_(\u0027value is not an integer\u0027))"},{"line_number":246,"context_line":"        return self._validate_number(value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgGE%3D","line":243,"in_reply_to":"AAAAUH%2F%2FgLo%3D","updated":"2014-01-13 09:27:03.000000000","message":"See answer above.","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"}],"heat/tests/test_properties.py":[{"author":{"_account_id":7385,"name":"Thomas Herve","email":"therve@redhat.com","username":"therve"},"change_message_id":"366438b354250a3ff73517d6ac8a2ca67fd92607","unresolved":false,"context_lines":[{"line_number":693,"context_line":"    def test_int_from_str_bad(self):"},{"line_number":694,"context_line":"        schema \u003d {\u0027Type\u0027: \u0027Integer\u0027}"},{"line_number":695,"context_line":"        p \u003d properties.Property(schema)"},{"line_number":696,"context_line":"        self.assertRaises(TypeError, p.validate_data, \u00273a\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    def test_integer_low(self):"},{"line_number":699,"context_line":"        schema \u003d {\u0027Type\u0027: \u0027Integer\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgKc%3D","line":696,"updated":"2014-01-13 09:12:34.000000000","message":"Please check the error message returned.","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"e1b941eb9dfa033116cbb3bc6eb56a659c921280","unresolved":false,"context_lines":[{"line_number":693,"context_line":"    def test_int_from_str_bad(self):"},{"line_number":694,"context_line":"        schema \u003d {\u0027Type\u0027: \u0027Integer\u0027}"},{"line_number":695,"context_line":"        p \u003d properties.Property(schema)"},{"line_number":696,"context_line":"        self.assertRaises(TypeError, p.validate_data, \u00273a\u0027)"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    def test_integer_low(self):"},{"line_number":699,"context_line":"        schema \u003d {\u0027Type\u0027: \u0027Integer\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FgGA%3D","line":696,"in_reply_to":"AAAAUH%2F%2FgKc%3D","updated":"2014-01-13 09:27:03.000000000","message":"I will do it in next patch","commit_id":"00bda72fbf6c0af8b2e5f13c40a2dc1b13d59a01"}]}
