)]}'
{"ldappool/__init__.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"405f5d3dddabdb2de3bc43c4bb3f34cc43b2b97e","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                                          retry_delay\u003dself.retry_delay)"},{"line_number":252,"context_line":"                conn.timeout \u003d self.timeout"},{"line_number":253,"context_line":"                self._bind(conn, bind, passwd)"},{"line_number":254,"context_line":"                connected \u003d True"},{"line_number":255,"context_line":"            except ldap.LDAPError as error:"},{"line_number":256,"context_line":"                exc \u003d error"},{"line_number":257,"context_line":"                if isinstance(exc, ldap.INVALID_CREDENTIALS):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_20b33c4f","line":254,"updated":"2018-08-13 14:33:08.000000000","message":"Instead of using isinstance, could we simply catch ldap.INVALID_CREDENTIALS here directly?","commit_id":"a932a13b7a4d2980e561a5ec8a595ac7913cadc2"}],"ldappool/tests/test_ldapconnection.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"59c10269cceb341b8d2f541233ac92d043384911","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        cm \u003d ldappool.ConnectionManager(uri, dn, passwd, use_pool\u003dTrue, size\u003d2)"},{"line_number":178,"context_line":"        self.assertEqual(len(cm), 0)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            with cm.connection(\u0027dn\u0027, \u0027pass\u0027):"},{"line_number":182,"context_line":"                pass"},{"line_number":183,"context_line":"        except ldap.INVALID_CREDENTIALS:"},{"line_number":184,"context_line":"            pass"},{"line_number":185,"context_line":"        else:"},{"line_number":186,"context_line":"            raise AssertionError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a860a7d0","line":186,"range":{"start_line":180,"start_character":0,"end_line":186,"end_character":34},"updated":"2018-08-11 22:14:35.000000000","message":"This is a minor concern (if you\u0027d like to change it you may or leave it as is). You could instead make the with block a function and use self.assertRaises\n\nExample:\n\n  def check_invalid_credential_handling():\n      with cm.connection(\u0027dn\u0027, \u0027pass\u0027):\n          pass\n\n  self.assertRaises(ldap.INVALID_CREDENTIALS, check_invalid_credential_handling)\n\n\nThis gets you the assertion error on line 186 if it isn\u0027t raised without needing to do the try/except/else explicitly.","commit_id":"a932a13b7a4d2980e561a5ec8a595ac7913cadc2"},{"author":{"_account_id":28891,"name":"Nick Wilburn","email":"senior.crepe@gmail.com","username":"nwilburn"},"change_message_id":"7065256237c2b078296259fe30f302a32e467bb9","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        cm \u003d ldappool.ConnectionManager(uri, dn, passwd, use_pool\u003dTrue, size\u003d2)"},{"line_number":178,"context_line":"        self.assertEqual(len(cm), 0)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            with cm.connection(\u0027dn\u0027, \u0027pass\u0027):"},{"line_number":182,"context_line":"                pass"},{"line_number":183,"context_line":"        except ldap.INVALID_CREDENTIALS:"},{"line_number":184,"context_line":"            pass"},{"line_number":185,"context_line":"        else:"},{"line_number":186,"context_line":"            raise AssertionError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_60adb4e7","line":186,"range":{"start_line":180,"start_character":0,"end_line":186,"end_character":34},"in_reply_to":"3f79a3b5_a860a7d0","updated":"2018-08-13 14:30:49.000000000","message":"Good point. That is a lot cleaner. I was attempting to keep the same format as the previous tests, however turning the with block into a function looks a lot more clean.\n\nIf its fine to deviate from the format of the previous tests then I will go ahead and make the suggested change.","commit_id":"a932a13b7a4d2980e561a5ec8a595ac7913cadc2"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"405f5d3dddabdb2de3bc43c4bb3f34cc43b2b97e","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        cm \u003d ldappool.ConnectionManager(uri, dn, passwd, use_pool\u003dTrue, size\u003d2)"},{"line_number":178,"context_line":"        self.assertEqual(len(cm), 0)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            with cm.connection(\u0027dn\u0027, \u0027pass\u0027):"},{"line_number":182,"context_line":"                pass"},{"line_number":183,"context_line":"        except ldap.INVALID_CREDENTIALS:"},{"line_number":184,"context_line":"            pass"},{"line_number":185,"context_line":"        else:"},{"line_number":186,"context_line":"            raise AssertionError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_40c75897","line":186,"range":{"start_line":180,"start_character":0,"end_line":186,"end_character":34},"in_reply_to":"3f79a3b5_a860a7d0","updated":"2018-08-13 14:33:08.000000000","message":"I agree it would be better not to use a try/except in a test like this but at least it\u0027s consistent with the way the other tests are done (we should probably go through all of these tests and fix them)","commit_id":"a932a13b7a4d2980e561a5ec8a595ac7913cadc2"}]}
