)]}'
{"ironic/common/driver_factory.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"1757ce613a85bbee5d6e993bb18917a77c12d48d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                            \u0027configuration file.\u0027),"},{"line_number":148,"context_line":"                        \u0027, \u0027.join(duplicated_drivers))"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        ENABLED_DRIVERS \u003d set(CONF.enabled_drivers)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # NOTE(deva): Drivers raise \"DriverLoadError\" if they are unable to be"},{"line_number":153,"context_line":"        #             loaded, eg. due to missing external dependencies."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_fd311fa3","line":150,"updated":"2016-03-24 15:38:08.000000000","message":"upper case variable names should only be used for module constants and globals, not function-local variables\n\nhttps://www.python.org/dev/peps/pep-0008/#constants","commit_id":"7f2ae4f995e00c0e8063f08b760fb2f79011f55f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b3779474b0404c98ff190b9569b042631d216689","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                            \u0027configuration file.\u0027),"},{"line_number":148,"context_line":"                        \u0027, \u0027.join(duplicated_drivers))"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        ENABLED_DRIVERS \u003d set(CONF.enabled_drivers)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # NOTE(deva): Drivers raise \"DriverLoadError\" if they are unable to be"},{"line_number":153,"context_line":"        #             loaded, eg. due to missing external dependencies."}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_88f7ffd1","line":150,"in_reply_to":"fa0719c6_fd311fa3","updated":"2016-03-24 15:49:09.000000000","message":"Done","commit_id":"7f2ae4f995e00c0e8063f08b760fb2f79011f55f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"fa46a4393f5a9545d9c7d67a628455e53d317f58","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        # Check for duplicated driver entries and warn the operator"},{"line_number":141,"context_line":"        # about them"},{"line_number":142,"context_line":"        counter \u003d collections.Counter(CONF.enabled_drivers).items()"},{"line_number":143,"context_line":"        duplicated_drivers \u003d list(dup for (dup, i) in counter if i \u003e 1)"},{"line_number":144,"context_line":"        if duplicated_drivers:"},{"line_number":145,"context_line":"            LOG.warning(_LW(\u0027The driver(s) \"%s\" is/are duplicated in the \u0027"},{"line_number":146,"context_line":"                            \u0027list of enabled_drivers. Please check your \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_55c8df54","line":143,"updated":"2016-03-24 17:27:12.000000000","message":"Not sure if this level of detail is needed, you can just look at the list and see if there are duplicates :) Maybe just\n\n if len(CONF.enabled_drivers) \u003e len(set(CONF.enabled_drivers)):\n   LOG.warning(...)\n\ncould work. But it LGTM.","commit_id":"420fe0c5abdf904d84ce40e7126ba13f39b15736"}],"ironic/tests/unit/common/test_driver_factory.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"1757ce613a85bbee5d6e993bb18917a77c12d48d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        driver_factory.DriverFactory._init_extension_manager()"},{"line_number":71,"context_line":"        self.assertEqual("},{"line_number":72,"context_line":"            [\u0027fake\u0027], driver_factory.DriverFactory._extension_manager.names())"},{"line_number":73,"context_line":"        mock_log.assert_called_once_with("},{"line_number":74,"context_line":"            \u0027The driver(s) \"%s\" is/are duplicated in the list of \u0027"},{"line_number":75,"context_line":"            \u0027enabled_drivers. Please check your configuration file.\u0027,"},{"line_number":76,"context_line":"            \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_ddc37b36","line":73,"updated":"2016-03-24 15:38:08.000000000","message":"string matching is not a good way to assert behavior of the function. The specific text of the message is not what should be asserted, but rather that a warning is issued and the function does not error.\n\nAlso, what if the locale where this test is run is not EN_US?","commit_id":"7f2ae4f995e00c0e8063f08b760fb2f79011f55f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b3779474b0404c98ff190b9569b042631d216689","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        driver_factory.DriverFactory._init_extension_manager()"},{"line_number":71,"context_line":"        self.assertEqual("},{"line_number":72,"context_line":"            [\u0027fake\u0027], driver_factory.DriverFactory._extension_manager.names())"},{"line_number":73,"context_line":"        mock_log.assert_called_once_with("},{"line_number":74,"context_line":"            \u0027The driver(s) \"%s\" is/are duplicated in the list of \u0027"},{"line_number":75,"context_line":"            \u0027enabled_drivers. Please check your configuration file.\u0027,"},{"line_number":76,"context_line":"            \u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_08c00f4f","line":73,"in_reply_to":"fa0719c6_ddc37b36","updated":"2016-03-24 15:49:09.000000000","message":"Right, I can check if warning has been called only. But we do force the locale to be en_us on tox [0]\n\n[0] https://github.com/openstack/ironic/blob/master/tox.ini#L13-L14","commit_id":"7f2ae4f995e00c0e8063f08b760fb2f79011f55f"}]}
