)]}'
{"keystone/common/ldap/core.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a0d0b7c3142b899e2db5cf2647b225abcc49a6c3","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return int(val)"},{"line_number":119,"context_line":"    except ValueError:"},{"line_number":120,"context_line":"        pass"},{"line_number":121,"context_line":"    return utf8_decode(val)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def ldap2py(val):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_785a1551","line":121,"updated":"2014-12-03 19:21:24.000000000","message":"why would enabled ever be a utf8 string? looks like it should either be LDAP_VALUES[val] or bool(int(val)) ? so in other words, a boolean no matter what. the ambiguity of the return type in this function baffles me","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"cdee02ec625cae5202b58e4a1735c325cc324ad5","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return int(val)"},{"line_number":119,"context_line":"    except ValueError:"},{"line_number":120,"context_line":"        pass"},{"line_number":121,"context_line":"    return utf8_decode(val)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def ldap2py(val):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_711734ef","line":121,"in_reply_to":"5a890539_785a1551","updated":"2014-12-05 19:11:34.000000000","message":"Its one of the vaguaries of LDAP.  Most places return it a a string, it is only AD that does a bit field.","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"94241da1639d01245b360a082fe10f6b28fe0a5e","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    :returns: val converted to preferred Python type"},{"line_number":133,"context_line":"    \"\"\""},{"line_number":134,"context_line":"    try:"},{"line_number":135,"context_line":"        return LDAP_VALUES[val]"},{"line_number":136,"context_line":"    except KeyError:"},{"line_number":137,"context_line":"        pass"},{"line_number":138,"context_line":"    return utf8_decode(val)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_8b03850f","line":135,"updated":"2014-12-05 23:14:32.000000000","message":"what happens if the user id is TRUE or FALSE?\n\nalso, seems like we should have to decode val first.","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1fbac4d746be61b8d4615855d97088277063b307","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    :returns: val converted to preferred Python type"},{"line_number":133,"context_line":"    \"\"\""},{"line_number":134,"context_line":"    try:"},{"line_number":135,"context_line":"        return LDAP_VALUES[val]"},{"line_number":136,"context_line":"    except KeyError:"},{"line_number":137,"context_line":"        pass"},{"line_number":138,"context_line":"    return utf8_decode(val)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_446267da","line":135,"in_reply_to":"5a890539_8b03850f","updated":"2014-12-08 02:25:37.000000000","message":"Then the flow is still the same as before.","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a0d0b7c3142b899e2db5cf2647b225abcc49a6c3","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        return LDAP_VALUES[val]"},{"line_number":136,"context_line":"    except KeyError:"},{"line_number":137,"context_line":"        pass"},{"line_number":138,"context_line":"    return utf8_decode(val)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def convert_ldap_result(ldap_result):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_bb15573e","line":138,"updated":"2014-12-03 19:21:24.000000000","message":"although the old function baffles me too, so maybe this isn\u0027t new","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"94241da1639d01245b360a082fe10f6b28fe0a5e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                if kind \u003d\u003d \u0027enabled\u0027:"},{"line_number":171,"context_line":"                    ldap_attrs[kind] \u003d [enabled2py(x) for x in values]"},{"line_number":172,"context_line":"                else:"},{"line_number":173,"context_line":"                    ldap_attrs[kind] \u003d [ldap2py(x) for x in values]"},{"line_number":174,"context_line":"            except UnicodeDecodeError:"},{"line_number":175,"context_line":"                LOG.debug(\u0027Unable to decode value for attribute %s\u0027, kind)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_666210db","line":173,"updated":"2014-12-05 23:14:32.000000000","message":"there\u0027s unnecessary copy-paste here:\n\n val2py \u003d enabled2py if kind \u003d\u003d \u0027enabled\u0027 else ldap2py\n ldap_attrs[kind] \u003d [val2py(x) for x in values]","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1fbac4d746be61b8d4615855d97088277063b307","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                if kind \u003d\u003d \u0027enabled\u0027:"},{"line_number":171,"context_line":"                    ldap_attrs[kind] \u003d [enabled2py(x) for x in values]"},{"line_number":172,"context_line":"                else:"},{"line_number":173,"context_line":"                    ldap_attrs[kind] \u003d [ldap2py(x) for x in values]"},{"line_number":174,"context_line":"            except UnicodeDecodeError:"},{"line_number":175,"context_line":"                LOG.debug(\u0027Unable to decode value for attribute %s\u0027, kind)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_c49d77bd","line":173,"in_reply_to":"5a890539_666210db","updated":"2014-12-08 02:25:37.000000000","message":"Done","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"}],"keystone/tests/unit/common/test_ldap.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"94241da1639d01245b360a082fe10f6b28fe0a5e","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        ), ]"},{"line_number":448,"context_line":"        py_result \u003d ks_ldap.convert_ldap_result(result)"},{"line_number":449,"context_line":"        # The user id should be 0123456, and the enabled"},{"line_number":450,"context_line":"        # flag should be TRUE"},{"line_number":451,"context_line":"        self.assertTrue(py_result[0][1][\u0027enabled\u0027][0])"},{"line_number":452,"context_line":"        self.assertEqual(user_id, py_result[0][1][\u0027user_id\u0027][0])"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_c67f4468","line":450,"updated":"2014-12-05 23:14:32.000000000","message":"change \"TRUE\" to \"True\"","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1fbac4d746be61b8d4615855d97088277063b307","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        ), ]"},{"line_number":448,"context_line":"        py_result \u003d ks_ldap.convert_ldap_result(result)"},{"line_number":449,"context_line":"        # The user id should be 0123456, and the enabled"},{"line_number":450,"context_line":"        # flag should be TRUE"},{"line_number":451,"context_line":"        self.assertTrue(py_result[0][1][\u0027enabled\u0027][0])"},{"line_number":452,"context_line":"        self.assertEqual(user_id, py_result[0][1][\u0027user_id\u0027][0])"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_a4986bcd","line":450,"in_reply_to":"5a890539_c67f4468","updated":"2014-12-08 02:25:37.000000000","message":"Done","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"94241da1639d01245b360a082fe10f6b28fe0a5e","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        py_result \u003d ks_ldap.convert_ldap_result(result)"},{"line_number":449,"context_line":"        # The user id should be 0123456, and the enabled"},{"line_number":450,"context_line":"        # flag should be TRUE"},{"line_number":451,"context_line":"        self.assertTrue(py_result[0][1][\u0027enabled\u0027][0])"},{"line_number":452,"context_line":"        self.assertEqual(user_id, py_result[0][1][\u0027user_id\u0027][0])"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"    def test_user_id_begins_with_0_and_enabled_bit_mask(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_e684405f","line":451,"updated":"2014-12-05 23:14:32.000000000","message":"use assertIs to ensure it\u0027s a boolean:\n\n self.assertIs(py_result[0][1][\u0027enabled\u0027][0], True)","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1fbac4d746be61b8d4615855d97088277063b307","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        py_result \u003d ks_ldap.convert_ldap_result(result)"},{"line_number":449,"context_line":"        # The user id should be 0123456, and the enabled"},{"line_number":450,"context_line":"        # flag should be TRUE"},{"line_number":451,"context_line":"        self.assertTrue(py_result[0][1][\u0027enabled\u0027][0])"},{"line_number":452,"context_line":"        self.assertEqual(user_id, py_result[0][1][\u0027user_id\u0027][0])"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"    def test_user_id_begins_with_0_and_enabled_bit_mask(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_845c4f1b","line":451,"in_reply_to":"5a890539_e684405f","updated":"2014-12-08 02:25:37.000000000","message":"Done","commit_id":"539bc12aa0871042311a6a8f10016a26ffba52ac"}]}
