)]}'
{"oslo_service/service.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"ce4a15541ee84afe4331d8b35d6dc8b9d94be587","unresolved":false,"context_lines":[{"line_number":818,"context_line":"    if workers is not None and workers \u003c\u003d 0:"},{"line_number":819,"context_line":"        raise ValueError(_(\"Number of workers should be positive!\"))"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    if workers is not None and not isinstance(workers, six.integer_types):"},{"line_number":822,"context_line":"        raise TypeError(_(\"Type of workers should be int!\"))"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    if workers is None or workers \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfbec78f_ef537ae1","line":821,"updated":"2019-05-04 14:40:54.000000000","message":"You need to check this before the previous test (workers number and not equal to zero)","commit_id":"0d2c05ee4420b507be6148701c11473c25957750"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"06f016adbcd8453ed2d825d7f144ee34bf988ceb","unresolved":false,"context_lines":[{"line_number":818,"context_line":"    if workers is not None and workers \u003c\u003d 0:"},{"line_number":819,"context_line":"        raise ValueError(_(\"Number of workers should be positive!\"))"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    if workers is not None and not isinstance(workers, six.integer_types):"},{"line_number":822,"context_line":"        raise TypeError(_(\"Type of workers should be int!\"))"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    if workers is None or workers \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfbec78f_6b0d393d","line":821,"in_reply_to":"dfbec78f_ef537ae1","updated":"2019-05-05 01:03:25.000000000","message":"Yes, thanks.","commit_id":"0d2c05ee4420b507be6148701c11473c25957750"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e1399211c2fd93b9a0b687382857bed10bccc0e0","unresolved":false,"context_lines":[{"line_number":815,"context_line":"    :returns: instance of a launcher that was used to launch the service"},{"line_number":816,"context_line":"    \"\"\""},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"    if workers is not None and not isinstance(workers, six.integer_types):"},{"line_number":819,"context_line":"        raise TypeError(_(\"Type of workers should be int!\"))"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    if workers is not None and workers \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_0a26aeb8","line":818,"updated":"2019-05-09 16:32:39.000000000","message":"Also instead of check instance type why do not simply try to cast parmeter to int and catch wrong values with something like that:\n\ntry:\n    workers \u003d int(workers)\nexcept ValueError:\n    raise TypeError(_(\"Type of workers should be an int value!\"))\n\nOr something like that to avoid user to check type on their side and simply pass a value that correspond to an int format.","commit_id":"60e160367d83ad32841a335fde63f259bb6346ef"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"3936807bf8f432d1e6eb36ee5773d2ad5d6402f1","unresolved":false,"context_lines":[{"line_number":815,"context_line":"    :returns: instance of a launcher that was used to launch the service"},{"line_number":816,"context_line":"    \"\"\""},{"line_number":817,"context_line":""},{"line_number":818,"context_line":"    if workers is not None and not isinstance(workers, six.integer_types):"},{"line_number":819,"context_line":"        raise TypeError(_(\"Type of workers should be int!\"))"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    if workers is not None and workers \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_70fab475","line":818,"in_reply_to":"dfbec78f_0a26aeb8","updated":"2019-05-11 03:05:06.000000000","message":"Yes, i agree with your kindness to help users. But sometimes, users need to know that they should configure the correct parameters. The style of this part of the code is to check the parameters, find the inappropriate value and then throw an exception. So i suggest that we maintain this style.","commit_id":"60e160367d83ad32841a335fde63f259bb6346ef"}]}
