)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, if duplicate parameters are passed to a neutron CLI"},{"line_number":10,"context_line":"and they cannot be appended(decided by argument parser), then"},{"line_number":11,"context_line":"the last occurrance of the duplicate parameter and its value is"},{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow the principle"},{"line_number":13,"context_line":"\u0027explicit is better than implicit\u0027, this patch is designed to raise"},{"line_number":14,"context_line":"an error message if such duplicate parameters are passed into the CLI."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a26ad4f_939e5c06","line":11,"updated":"2015-10-27 06:55:54.000000000","message":"occurrence","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"35c58852037e53fd347a05191208abbe9bd2c15e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, if duplicate parameters are passed to a neutron CLI"},{"line_number":10,"context_line":"and they cannot be appended(decided by argument parser), then"},{"line_number":11,"context_line":"the last occurrance of the duplicate parameter and its value is"},{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow the principle"},{"line_number":13,"context_line":"\u0027explicit is better than implicit\u0027, this patch is designed to raise"},{"line_number":14,"context_line":"an error message if such duplicate parameters are passed into the CLI."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a26ad4f_364bb6b2","line":11,"in_reply_to":"1a26ad4f_939e5c06","updated":"2015-10-27 07:19:50.000000000","message":"Done","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, if duplicate parameters are passed to a neutron CLI"},{"line_number":10,"context_line":"and they cannot be appended(decided by argument parser), then"},{"line_number":11,"context_line":"the last occurrance of the duplicate parameter and its value is"},{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow the principle"},{"line_number":13,"context_line":"\u0027explicit is better than implicit\u0027, this patch is designed to raise"},{"line_number":14,"context_line":"an error message if such duplicate parameters are passed into the CLI."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a26ad4f_b3483889","line":12,"updated":"2015-10-27 06:55:54.000000000","message":"afaik, it\u0027s a limitation inherited from argparse so i believe that the right way to check this is to overload argparse?","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"35c58852037e53fd347a05191208abbe9bd2c15e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, if duplicate parameters are passed to a neutron CLI"},{"line_number":10,"context_line":"and they cannot be appended(decided by argument parser), then"},{"line_number":11,"context_line":"the last occurrance of the duplicate parameter and its value is"},{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow the principle"},{"line_number":13,"context_line":"\u0027explicit is better than implicit\u0027, this patch is designed to raise"},{"line_number":14,"context_line":"an error message if such duplicate parameters are passed into the CLI."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a26ad4f_16fc7a3d","line":12,"in_reply_to":"1a26ad4f_b3483889","updated":"2015-10-27 07:19:50.000000000","message":"Not sure if there is any code in argparser which hnadles duplicacy or similar operation.\nWill check out the argparse code  for more structured code.","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"534f34627b80c86f27d770add44a048dab2ab2a1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, if duplicate parameters are passed to a neutron CLI"},{"line_number":10,"context_line":"and they cannot be appended(decided by argument parser), then"},{"line_number":11,"context_line":"the last occurrence of the duplicate parameter and its value is"},{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow the principle"},{"line_number":13,"context_line":"\u0027explicit is better than implicit\u0027, this patch is designed to raise"},{"line_number":14,"context_line":"an error message if such duplicate parameters are passed into the CLI."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a26ad4f_f843ce6a","line":12,"updated":"2015-10-28 03:27:04.000000000","message":"Needs to be reformatted for a better visual experience in commit mesage","commit_id":"04758366bf2036e576c94d5450595cce39e53167"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a9c7ac575b70b01ac67687902c20d1050879f43b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow"},{"line_number":13,"context_line":"the principle \u0027explicit is better than implicit\u0027, this patch is"},{"line_number":14,"context_line":"designed to raise an error message if such duplicate parameters"},{"line_number":15,"context_line":"are passed into the CLI."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I869b31aa4e06e323d35ac6124f345c63fcd4015d"},{"line_number":18,"context_line":"Closes-Bug: #1327071"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da85f559_fc6899bc","line":15,"updated":"2015-11-09 08:47:32.000000000","message":"the new behaviour sounds rather surprising to me.","commit_id":"00dea0433f021fd3eefb42cfdedc54ec73059fcf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"bffb1438ba184ffc5e9e81c987934a5edf0cf27b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow"},{"line_number":13,"context_line":"the principle \u0027explicit is better than implicit\u0027, this patch is"},{"line_number":14,"context_line":"designed to raise an error message if such duplicate parameters"},{"line_number":15,"context_line":"are passed into the CLI."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I869b31aa4e06e323d35ac6124f345c63fcd4015d"},{"line_number":18,"context_line":"Closes-Bug: #1327071"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da85f559_c71a9e17","line":15,"in_reply_to":"da85f559_5c87650f","updated":"2015-11-09 09:14:16.000000000","message":"because it\u0027s how many of unix commands work.\ni don\u0027t insist on this as it\u0027s a matter of taste, though.","commit_id":"00dea0433f021fd3eefb42cfdedc54ec73059fcf"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"09a2baab766e03724f5159714d21acdee0eecd67","unresolved":false,"context_lines":[{"line_number":12,"context_line":"accepted. However, this behavior is not correct. In order to follow"},{"line_number":13,"context_line":"the principle \u0027explicit is better than implicit\u0027, this patch is"},{"line_number":14,"context_line":"designed to raise an error message if such duplicate parameters"},{"line_number":15,"context_line":"are passed into the CLI."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I869b31aa4e06e323d35ac6124f345c63fcd4015d"},{"line_number":18,"context_line":"Closes-Bug: #1327071"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da85f559_5c87650f","line":15,"in_reply_to":"da85f559_fc6899bc","updated":"2015-11-09 08:52:58.000000000","message":"I think that the initial behavior is not correct.\nThats because if a user specifies an argument twice,   which is not a part of  ´List Arguments´, then the CLI would take up the last value of the argument.\nFrom a  user point of view, instead of CLI moving forward, the user should be notified of the problem.\n\n\nPlease let me know why it surprises you  ?? :)","commit_id":"00dea0433f021fd3eefb42cfdedc54ec73059fcf"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"190f30ff0461cc1672b37833a289a5e0d96e43fc","unresolved":false,"context_lines":[{"line_number":13,"context_line":"the principle \u0027explicit is better than implicit\u0027, this patch is"},{"line_number":14,"context_line":"designed to raise an error message if such duplicate parameters"},{"line_number":15,"context_line":"are passed into the CLI."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I869b31aa4e06e323d35ac6124f345c63fcd4015d"},{"line_number":18,"context_line":"Closes-Bug: #1327071"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da85f559_dfdad9e7","line":16,"updated":"2015-11-11 17:05:57.000000000","message":"Should this have any documentation or compatibility impact listed?","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9d455a045b86ce763440abdf8afc9cc22da2608f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"the principle \u0027explicit is better than implicit\u0027, this patch is"},{"line_number":14,"context_line":"designed to raise an error message if such duplicate parameters"},{"line_number":15,"context_line":"are passed into the CLI."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I869b31aa4e06e323d35ac6124f345c63fcd4015d"},{"line_number":18,"context_line":"Closes-Bug: #1327071"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da85f559_ae85535a","line":16,"in_reply_to":"da85f559_dfdad9e7","updated":"2015-11-12 00:11:17.000000000","message":"From my understanding, it should not.But other reviewers may be able to guide me further .\nIMO, its just that the duplicate parameters which have been found should be notified to the user, so that the user can fix the entered CLI.\nHowever, there is a new error message being reported, so it may impact Doc","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"}],"neutronclient/shell.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from __future__ import print_function"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import argparse"},{"line_number":24,"context_line":"from collections import defaultdict"},{"line_number":25,"context_line":"import getpass"},{"line_number":26,"context_line":"import inspect"},{"line_number":27,"context_line":"import itertools"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_936c1c0a","line":24,"updated":"2015-10-27 06:55:54.000000000","message":"import only modules","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c5f165d234881f0c98e18f78e7334d1659e29f8f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from __future__ import print_function"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import argparse"},{"line_number":24,"context_line":"from collections import defaultdict"},{"line_number":25,"context_line":"import getpass"},{"line_number":26,"context_line":"import inspect"},{"line_number":27,"context_line":"import itertools"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_960baa7d","line":24,"in_reply_to":"1a26ad4f_936c1c0a","updated":"2015-10-27 07:15:27.000000000","message":"Umm, ok , will do so.","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":832,"context_line":"            self.log.error(\"%s\", e)"},{"line_number":833,"context_line":"        return 1"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":836,"context_line":"        arg_info \u003d defaultdict(int)"},{"line_number":837,"context_line":"        action_info \u003d []"},{"line_number":838,"context_line":"        dup_flag \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_73094031","line":835,"updated":"2015-10-27 06:55:54.000000000","message":"iiuc, argparse already performs such parsing why reinventing the wheel, we cannot extend argparse?","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"06eb0660ed79eda36f94f6672dc6afde491364ec","unresolved":false,"context_lines":[{"line_number":832,"context_line":"            self.log.error(\"%s\", e)"},{"line_number":833,"context_line":"        return 1"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":836,"context_line":"        arg_info \u003d defaultdict(int)"},{"line_number":837,"context_line":"        action_info \u003d []"},{"line_number":838,"context_line":"        dup_flag \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_754fdb92","line":835,"in_reply_to":"1a26ad4f_563f5225","updated":"2015-11-04 03:44:57.000000000","message":"Hi Cedric, \nI have verified and it seems difficult to extend argparse, as the argparse code cannot be directly modified and committed.\nI would like to proceed with the current code itself, if its ok?","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c5f165d234881f0c98e18f78e7334d1659e29f8f","unresolved":false,"context_lines":[{"line_number":832,"context_line":"            self.log.error(\"%s\", e)"},{"line_number":833,"context_line":"        return 1"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":836,"context_line":"        arg_info \u003d defaultdict(int)"},{"line_number":837,"context_line":"        action_info \u003d []"},{"line_number":838,"context_line":"        dup_flag \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_563f5225","line":835,"in_reply_to":"1a26ad4f_73094031","updated":"2015-10-27 07:15:27.000000000","message":"I have not yet seen argparse perform similar kind of operation and I am not sure if it works with the type of action to which the parsed argument is associated with.","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":840,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":841,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":842,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":843,"context_line":"            if type(actions) \u003d\u003d argparse._AppendAction:"},{"line_number":844,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":845,"context_line":"        for arg in arg_info.iterkeys():"},{"line_number":846,"context_line":"            # check which arguments have been repeated more than once"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_363176ed","line":843,"updated":"2015-10-27 06:55:54.000000000","message":"prefer:\n\n isinstance(actions, argparse._AppendAction)","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c5f165d234881f0c98e18f78e7334d1659e29f8f","unresolved":false,"context_lines":[{"line_number":840,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":841,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":842,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":843,"context_line":"            if type(actions) \u003d\u003d argparse._AppendAction:"},{"line_number":844,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":845,"context_line":"        for arg in arg_info.iterkeys():"},{"line_number":846,"context_line":"            # check which arguments have been repeated more than once"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_763cce2f","line":843,"in_reply_to":"1a26ad4f_363176ed","updated":"2015-10-27 07:15:27.000000000","message":"Ohk, done","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5683d71ab907dd58094ddbe0df376b06402dcedd","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":843,"context_line":"            if type(actions) \u003d\u003d argparse._AppendAction:"},{"line_number":844,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":845,"context_line":"        for arg in arg_info.iterkeys():"},{"line_number":846,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":847,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":848,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_b33fd8d5","line":845,"updated":"2015-10-27 06:55:54.000000000","message":"dict.iterkeys is not py3K compliant","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c5f165d234881f0c98e18f78e7334d1659e29f8f","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":843,"context_line":"            if type(actions) \u003d\u003d argparse._AppendAction:"},{"line_number":844,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":845,"context_line":"        for arg in arg_info.iterkeys():"},{"line_number":846,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":847,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":848,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a26ad4f_364656c0","line":845,"in_reply_to":"1a26ad4f_b33fd8d5","updated":"2015-10-27 07:15:27.000000000","message":"Understood, will fix this","commit_id":"4b122173181c7a60be9a519660455e6e62052572"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"273d30444b710ccdba1e8c4e56139b9c56c7ee80","unresolved":false,"context_lines":[{"line_number":832,"context_line":"            self.log.error(\"%s\", e)"},{"line_number":833,"context_line":"        return 1"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":836,"context_line":"        arg_info \u003d collections.defaultdict(int)"},{"line_number":837,"context_line":"        action_info \u003d []"},{"line_number":838,"context_line":"        dup_flag \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_aea94be1","line":835,"updated":"2015-10-30 02:49:55.000000000","message":"As per the discussion in the summit, need to relook the Nova Client API.\nThanks Cedric.","commit_id":"04758366bf2036e576c94d5450595cce39e53167"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bf64267e595afbfdfdd5da090c07aa69d7980e2f","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_4b13cb0d","line":849,"updated":"2015-11-18 05:49:51.000000000","message":"I would prefer that all are collected here and returned the user. It only takes a small code change (make dup_flag a list, append to it here, and remove the break statement). It results in a better user experience.","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"190f30ff0461cc1672b37833a289a5e0d96e43fc","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_7ff08d91","line":849,"updated":"2015-11-11 17:05:57.000000000","message":"Instead of breaking here, should all duplicate parameters be collected and then listed in the error message?","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7d0b22fad53ba8894fb4bbc4a87d29ab0286f7be","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_8bd77322","line":849,"in_reply_to":"ba8a016a_4b13cb0d","updated":"2015-11-18 05:53:45.000000000","message":"Hmm,\nI agree with you from a user point of view.\nOk, Lemme change it....","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7fd05435bd54e11b617a6801a8640e93f6a89c2c","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_eba4ffa6","line":849,"in_reply_to":"ba8a016a_8bd77322","updated":"2015-11-18 05:59:01.000000000","message":"But one difference, the output will not be shown in the List format [\u0027XXX\u0027,\u0027YYY\u0027,\u0027ZZZ\u0027].\nHope thats ok....","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9d455a045b86ce763440abdf8afc9cc22da2608f","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_eee6fb42","line":849,"in_reply_to":"da85f559_7ff08d91","updated":"2015-11-12 00:11:17.000000000","message":"IMO, the first duplicate parameter found would be enough to be notified to the user.","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17104,"name":"Kenji Yasui","email":"k-yasui@ti.jp.nec.com","username":"yasui"},"change_message_id":"63ca1e4549c9d6887dad58a501acb6152779f632","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_0502a60b","line":849,"in_reply_to":"da85f559_eee6fb42","updated":"2015-11-16 06:28:52.000000000","message":"Reedip +1. Given the purpose of this patch, I think it is enough.","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"190f30ff0461cc1672b37833a289a5e0d96e43fc","unresolved":false,"context_lines":[{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_1feaa1ac","line":851,"updated":"2015-11-11 17:05:57.000000000","message":"nit...space after the colon","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17104,"name":"Kenji Yasui","email":"k-yasui@ti.jp.nec.com","username":"yasui"},"change_message_id":"63ca1e4549c9d6887dad58a501acb6152779f632","unresolved":false,"context_lines":[{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_e8c89776","line":851,"updated":"2015-11-16 06:28:52.000000000","message":"nit: parameters? arguments? \"arguments\" is used in other parts. (L845)","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9d455a045b86ce763440abdf8afc9cc22da2608f","unresolved":false,"context_lines":[{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_2ec883a5","line":851,"in_reply_to":"da85f559_1feaa1ac","updated":"2015-11-12 00:11:17.000000000","message":"Waiting for other reviewers.\nIf a new patch is desired, then will change this as well, otherwise I found the lack of space tolerable in the display for this scenario","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"45426c8250c98f25a8f57782e32029f3b0877989","unresolved":false,"context_lines":[{"line_number":848,"context_line":"                dup_flag \u003d arg"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if dup_flag:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_flag))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_084abbac","line":851,"in_reply_to":"da85f559_e8c89776","updated":"2015-11-16 06:34:22.000000000","message":"Dear Yasui San,\nThanks for the comments.\nHowever, parameters and arguments are somewhat interchangable when considering Command Line Interfaces.","commit_id":"8a8edb9579a87a47535d4c30a5845f32dca595c3"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"77cc2e97fc90cb5604b0bce085176dca59f2298a","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":847,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":848,"context_line":"                dup_list.append(arg)"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_b5b25404","line":849,"updated":"2015-11-20 04:30:19.000000000","message":"Silly me, this break is Breaking the new listing functionality ..  :D","commit_id":"d7ca5bae1653af21af9132501d5ae4929daa716c"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"526539c8ef17489b3cf0c043c99c57f8de338cbd","unresolved":false,"context_lines":[{"line_number":848,"context_line":"                dup_list.append(arg)"},{"line_number":849,"context_line":"                break"},{"line_number":850,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":851,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found:\" + str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_fbecb8f4","line":851,"updated":"2015-11-18 13:51:07.000000000","message":"nit...add a space after the colon","commit_id":"d7ca5bae1653af21af9132501d5ae4929daa716c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        action_info \u003d []"},{"line_number":836,"context_line":"        dup_list \u003d []"},{"line_number":837,"context_line":"        for args in list(sub_argv):"},{"line_number":838,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_e55ce64c","line":838,"updated":"2015-12-13 03:21:02.000000000","message":"What does the comment mean? Could you elaborate more?\n\nThis logic also checks extra arguments. Is it intended?\n\nIn the extra argument mechanism, option names with underscore delimiters and options with hyphen delimiters are considered as same.\nIsn\u0027t it better to check duplications of these two types?","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e16263a62ab9d824e3d84c653a183fa0e4a5a1b7","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        action_info \u003d []"},{"line_number":836,"context_line":"        dup_list \u003d []"},{"line_number":837,"context_line":"        for args in list(sub_argv):"},{"line_number":838,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_9323b1bc","line":838,"in_reply_to":"7a740942_e55ce64c","updated":"2016-01-07 06:36:58.000000000","message":"A)The comment was intended to ask the reviewer, if only -- is required or should we target attributes with - only.( like -h)\nBut on second thought, I think its not required right now.\n\nB) Extra argument check is intended.\n\nC) Currently the scope of this patch was only attributes with ´--´ because as per the CLI guidelines for neutronclient, *ideally* attributes should not be delimited by _.\nHowever, if you would like, I can put up another patch where the delimiters(-- and _) are removed and all attributes matched up.\nWill create the new patch and upload it for review.","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":837,"context_line":"        for args in list(sub_argv):"},{"line_number":838,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"},{"line_number":842,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":843,"context_line":"        for arg in arg_info:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_050fb239","line":840,"updated":"2015-12-13 03:21:02.000000000","message":"actions -\u003e action","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e16263a62ab9d824e3d84c653a183fa0e4a5a1b7","unresolved":false,"context_lines":[{"line_number":837,"context_line":"        for args in list(sub_argv):"},{"line_number":838,"context_line":"            if \u0027--\u0027 in args:    # could be converted to single - if required"},{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"},{"line_number":842,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":843,"context_line":"        for arg in arg_info:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_f306ad84","line":840,"in_reply_to":"7a740942_050fb239","updated":"2016-01-07 06:36:58.000000000","message":"Done","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"},{"line_number":842,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":843,"context_line":"        for arg in arg_info:"},{"line_number":844,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":845,"context_line":"            # and verify if those arguments are in the AppendAction list"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_253d0edd","line":842,"updated":"2015-12-13 03:21:02.000000000","message":"action_info should have a more meaningful name.","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"bd2a4acc75ece0d11a87c4363b620f0a5fcd6d45","unresolved":false,"context_lines":[{"line_number":839,"context_line":"                arg_info[args] +\u003d 1"},{"line_number":840,"context_line":"        for actions in cmd_parser._actions:"},{"line_number":841,"context_line":"            if isinstance(actions, argparse._AppendAction):"},{"line_number":842,"context_line":"                action_info +\u003d actions.option_strings"},{"line_number":843,"context_line":"        for arg in arg_info:"},{"line_number":844,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":845,"context_line":"            # and verify if those arguments are in the AppendAction list"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_0072d67c","line":842,"in_reply_to":"7a740942_253d0edd","updated":"2016-01-08 00:35:46.000000000","message":"it is used to save the information for the action type, I guess it is ok","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":844,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":845,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":846,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":847,"context_line":"                dup_list.append(arg)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_97e1992c","line":847,"updated":"2015-12-13 03:21:02.000000000","message":"You can use the list comprehension.\n\n  dup_list \u003d [arg for arg in arg_info\n               if arg_info[arg] \u003e 1 and arg not in action_info]\n\nThere is no need for the parenthese around \u0027not in\u0027.","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"02b67457d49a4d53a9834f4d4f74fbff3968ba3a","unresolved":false,"context_lines":[{"line_number":844,"context_line":"            # check which arguments have been repeated more than once"},{"line_number":845,"context_line":"            # and verify if those arguments are in the AppendAction list"},{"line_number":846,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":847,"context_line":"                dup_list.append(arg)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_cc6f46c2","line":847,"in_reply_to":"7a740942_97e1992c","updated":"2016-01-07 07:39:25.000000000","message":"To counter the handling of --x-y-z and --x_y_z, would have to avoid list comprehension for now","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":847,"context_line":"                dup_list.append(arg)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_b797f58e","line":849,"updated":"2015-12-13 03:21:02.000000000","message":"It can be:\n\n  if dup_list:","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e16263a62ab9d824e3d84c653a183fa0e4a5a1b7","unresolved":false,"context_lines":[{"line_number":846,"context_line":"            if arg_info[arg] \u003e 1 and (arg not in action_info):"},{"line_number":847,"context_line":"                dup_list.append(arg)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_53d539e2","line":849,"in_reply_to":"7a740942_b797f58e","updated":"2016-01-07 06:36:58.000000000","message":"Done","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_454b7a87","line":851,"updated":"2015-12-13 03:21:02.000000000","message":"- Duplicate -\u003e Duplicated\n- parameters -\u003e options\n- Use a comma instead of %\n- There is no need to use str(). %s does this.\n\n   error(\"Duplicated options found: %s\", dup_list)","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e16263a62ab9d824e3d84c653a183fa0e4a5a1b7","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_53ec59ba","line":851,"in_reply_to":"7a740942_454b7a87","updated":"2016-01-07 06:36:58.000000000","message":"Done","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"faf24e24025dcb390057273d4d2b5d71ae9354fb","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"},{"line_number":855,"context_line":"        \"\"\"Make sure the user has provided all of the authentication"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_25466e7b","line":852,"updated":"2015-12-13 03:21:02.000000000","message":"Isn\u0027t neutronclient.common.NeutronCommandError or NeutronCLIError sufficient? At least SystemExit should be raised.","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e16263a62ab9d824e3d84c653a183fa0e4a5a1b7","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        if len(dup_list) !\u003d 0:"},{"line_number":850,"context_line":"            self.log.error(\"%s\", \"Duplicate parameters found: \" +"},{"line_number":851,"context_line":"                           str(dup_list))"},{"line_number":852,"context_line":"            sys.exit(1)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def authenticate_user(self):"},{"line_number":855,"context_line":"        \"\"\"Make sure the user has provided all of the authentication"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_b3e6f5ad","line":852,"in_reply_to":"7a740942_25466e7b","updated":"2016-01-07 06:36:58.000000000","message":"Done","commit_id":"fab0d3265401ac2cf3117318eb306967adec17c8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        return 1"},{"line_number":836,"context_line":""},{"line_number":837,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":838,"context_line":"        arg_count \u003d collections.defaultdict(int)"},{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_cece3083","line":838,"range":{"start_line":838,"start_character":19,"end_line":838,"end_character":48},"updated":"2016-01-19 11:01:01.000000000","message":"Consider using collections.Counter?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        return 1"},{"line_number":836,"context_line":""},{"line_number":837,"context_line":"    def check_for_duplicate_parameters(self, cmd_parser, sub_argv):"},{"line_number":838,"context_line":"        arg_count \u003d collections.defaultdict(int)"},{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_def00ecc","line":838,"range":{"start_line":838,"start_character":19,"end_line":838,"end_character":48},"in_reply_to":"ba63e191_cece3083","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_2eecacc6","line":842,"range":{"start_line":842,"start_character":20,"end_line":842,"end_character":34},"updated":"2016-01-19 11:01:01.000000000","message":"Why do we need to use list()?\n\nDoes not \"for args in sub_argv\" work?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_ae741cfd","line":842,"range":{"start_line":842,"start_character":12,"end_line":842,"end_character":16},"updated":"2016-01-19 11:01:01.000000000","message":"args -\u003e arg?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_5e817efa","line":842,"range":{"start_line":842,"start_character":20,"end_line":842,"end_character":34},"in_reply_to":"ba63e191_2eecacc6","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        arg_name \u003d collections.defaultdict(list)"},{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_7e86c214","line":842,"range":{"start_line":842,"start_character":12,"end_line":842,"end_character":16},"in_reply_to":"ba63e191_ae741cfd","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_0e9f6804","line":843,"updated":"2016-01-19 11:01:01.000000000","message":"If you want to skip a value, startswith() should be used.\n\n  if not args.startswith(\u0027--\u0027):\n      continue","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        action_info \u003d []"},{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_3e792a30","line":843,"in_reply_to":"ba63e191_0e9f6804","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_2ed6ecc5","line":844,"range":{"start_line":844,"start_character":16,"end_line":844,"end_character":53},"updated":"2016-01-19 11:01:01.000000000","message":"What do you want to do here? Do you want to strip the left-most \u0027--\u0027 in args? Or do you want to drop all \u0027--\u0027?\n\nIf \u0027args\u0027 is \"foo--bar--baz\", you will get temp_args \"foobarbaz\".\nI think it is not intended.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"3204ed7c0da3ca537dd249d035dad543316b3d57","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        dup_list \u003d []"},{"line_number":842,"context_line":"        for args in list(sub_argv):"},{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_8186bb11","line":844,"range":{"start_line":844,"start_character":16,"end_line":844,"end_character":53},"in_reply_to":"ba63e191_2ed6ecc5","updated":"2016-01-27 03:13:38.000000000","message":"Fixed","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"},{"line_number":848,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"_\"))"},{"line_number":849,"context_line":"                arg_count[temp_args] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_4e63201b","line":846,"range":{"start_line":846,"start_character":20,"end_line":846,"end_character":60},"updated":"2016-01-19 11:01:01.000000000","message":"This means \u0027--a-b-c\u0027 and \u0027--abc\u0027 are considered same.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":843,"context_line":"            if \u0027--\u0027 in args:"},{"line_number":844,"context_line":"                temp_args \u003d \"\".join(args.split(\"--\"))"},{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"},{"line_number":848,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"_\"))"},{"line_number":849,"context_line":"                arg_count[temp_args] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_be167aa5","line":846,"range":{"start_line":846,"start_character":20,"end_line":846,"end_character":60},"in_reply_to":"ba63e191_4e63201b","updated":"2016-01-27 02:43:41.000000000","message":"Removed it, used the below logic of replace to make the code a bit more manageable.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"},{"line_number":848,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"_\"))"},{"line_number":849,"context_line":"                arg_count[temp_args] +\u003d 1"},{"line_number":850,"context_line":"                if args not in arg_name[temp_args]:"},{"line_number":851,"context_line":"                    arg_name[temp_args] +\u003d [args]"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_8477b701","line":848,"updated":"2016-01-19 11:01:01.000000000","message":"why not replace(\u0027_\u0027, \u0027-\u0027)?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":845,"context_line":"                if \u0027-\u0027 in temp_args:"},{"line_number":846,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"-\"))"},{"line_number":847,"context_line":"                elif \u0027_\u0027 in temp_args:"},{"line_number":848,"context_line":"                    temp_args \u003d \"\".join(temp_args.split(\"_\"))"},{"line_number":849,"context_line":"                arg_count[temp_args] +\u003d 1"},{"line_number":850,"context_line":"                if args not in arg_name[temp_args]:"},{"line_number":851,"context_line":"                    arg_name[temp_args] +\u003d [args]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_7e1002a9","line":848,"in_reply_to":"ba63e191_8477b701","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                if args not in arg_name[temp_args]:"},{"line_number":851,"context_line":"                    arg_name[temp_args] +\u003d [args]"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_013bb9ec","line":853,"range":{"start_line":853,"start_character":22,"end_line":853,"end_character":41},"updated":"2016-01-19 11:01:01.000000000","message":"cmd_parser._actions contains action or action group. Don\u0027t you need to handle an action group too?\n\n(BTW.... Honestly I don\u0027t want to access a private attribute)","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"64d4cc886f79e0e4866e0063cc3285f598786eea","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                if args not in arg_name[temp_args]:"},{"line_number":851,"context_line":"                    arg_name[temp_args] +\u003d [args]"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_c1783392","line":853,"range":{"start_line":853,"start_character":22,"end_line":853,"end_character":41},"in_reply_to":"9a68dd71_fee1529b","updated":"2016-01-27 02:57:27.000000000","message":"Also, I could not find action group in the current source code.\nCould you please let me know where it is currently being used?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                if args not in arg_name[temp_args]:"},{"line_number":851,"context_line":"                    arg_name[temp_args] +\u003d [args]"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_fee1529b","line":853,"range":{"start_line":853,"start_character":22,"end_line":853,"end_character":41},"in_reply_to":"ba63e191_013bb9ec","updated":"2016-01-27 02:43:41.000000000","message":"Is there any other way to access it, except may be make a function which accesses it and sends it back to me(??)","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        for index in arg_count:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_64040315","line":855,"range":{"start_line":855,"start_character":15,"end_line":855,"end_character":27},"updated":"2016-01-19 11:01:01.000000000","message":"The variable name should be more self-descriptive.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"3204ed7c0da3ca537dd249d035dad543316b3d57","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        for index in arg_count:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_6198676b","line":855,"range":{"start_line":855,"start_character":15,"end_line":855,"end_character":27},"in_reply_to":"9a68dd71_7e87a2d7","updated":"2016-01-27 03:13:38.000000000","message":"action_info basically is intended to mean ¨information about action¨","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":852,"context_line":""},{"line_number":853,"context_line":"        for action in cmd_parser._actions:"},{"line_number":854,"context_line":"            if isinstance(action, argparse._AppendAction):"},{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        for index in arg_count:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_7e87a2d7","line":855,"range":{"start_line":855,"start_character":15,"end_line":855,"end_character":27},"in_reply_to":"ba63e191_64040315","updated":"2016-01-27 02:43:41.000000000","message":"Any suggestions?","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        for index in arg_count:"},{"line_number":859,"context_line":"            appendArg \u003d True"},{"line_number":860,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":861,"context_line":"                for item in arg_name[index]:"},{"line_number":862,"context_line":"                    if item not in action_info:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_c4136f5b","line":859,"range":{"start_line":859,"start_character":12,"end_line":859,"end_character":21},"updated":"2016-01-19 11:01:01.000000000","message":"We don\u0027t use camel case name.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        for index in arg_count:"},{"line_number":859,"context_line":"            appendArg \u003d True"},{"line_number":860,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":861,"context_line":"                for item in arg_name[index]:"},{"line_number":862,"context_line":"                    if item not in action_info:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_5e82dec9","line":859,"range":{"start_line":859,"start_character":12,"end_line":859,"end_character":21},"in_reply_to":"ba63e191_c4136f5b","updated":"2016-01-27 02:43:41.000000000","message":"Done","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8a9ef9bda9b0b3c996d0cfaa886f308049bfdde7","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                for arg in arg_name[index]:"},{"line_number":867,"context_line":"                    dup_list.append(arg)"},{"line_number":868,"context_line":"        if dup_list:"},{"line_number":869,"context_line":"            self.log.error(\"Duplicated options found: %s\", dup_list)"},{"line_number":870,"context_line":"            raise SystemExit(1)"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba63e191_44b69fdd","line":869,"updated":"2016-01-19 11:01:01.000000000","message":"I think the option name is enough and there is no need to show a full list of duplicated options.\n\nIf so, dup_list would be much simpler with collection.Counter:\n\n  dup_list \u003d [k, v for k, v in arg_count.items()\n              if v \u003e 1 and k not in append_options]","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51926c0caf8ec44921d6640d537a269c533c49f5","unresolved":false,"context_lines":[{"line_number":866,"context_line":"                for arg in arg_name[index]:"},{"line_number":867,"context_line":"                    dup_list.append(arg)"},{"line_number":868,"context_line":"        if dup_list:"},{"line_number":869,"context_line":"            self.log.error(\"Duplicated options found: %s\", dup_list)"},{"line_number":870,"context_line":"            raise SystemExit(1)"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"    def authenticate_user(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a68dd71_5e597e8d","line":869,"in_reply_to":"ba63e191_44b69fdd","updated":"2016-01-27 02:43:41.000000000","message":"I consider it otherwise.\nI think that user should be shown all the options that he/she has repeated.\nThat ways , a user would know which options should not be used repeatedly.","commit_id":"0b023ada04ceb55aff2b0ba875225e4c625f9422"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"48febf6ab89fd4e571a88213f29488a916d07dd6","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":853,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":854,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":855,"context_line":"        for index in arg_count:"},{"line_number":856,"context_line":"            append_arg \u003d True"},{"line_number":857,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":858,"context_line":"                for item in arg_name[index]:"},{"line_number":859,"context_line":"                    if item not in action_info:"},{"line_number":860,"context_line":"                        append_arg \u003d False"},{"line_number":861,"context_line":"                        break"},{"line_number":862,"context_line":"            if not append_arg:"},{"line_number":863,"context_line":"                for arg in arg_name[index]:"},{"line_number":864,"context_line":"                    dup_list.append(arg)"},{"line_number":865,"context_line":"        if dup_list:"},{"line_number":866,"context_line":"            self.log.error(\"Duplicated options found: %s\", dup_list)"},{"line_number":867,"context_line":"            raise SystemExit(1)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_a4715ee2","line":864,"range":{"start_line":855,"start_character":8,"end_line":864,"end_character":40},"updated":"2016-02-11 09:23:32.000000000","message":"A simpler and efficient alternative ?\n\nfor index in arg_count:\n    if arg_count[index] \u003e 1 and not set(arg_name[index]).issubset(action_info):\n            dup_list.append(arg_name[index])\n\nOR\n\ndup_list \u003d [ arg_name[index] if arg_count[index] \u003e 1 and not set(\narg_name[index]).issubset(action_info) for index in arg_count ]","commit_id":"8b494632a083ac8c02baa33091cec0073a295666"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"f5557c13f07d3c5be6c67ca9b0d2526d77d45f32","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":853,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":854,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":855,"context_line":"        for index in arg_count:"},{"line_number":856,"context_line":"            append_arg \u003d True"},{"line_number":857,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":858,"context_line":"                for item in arg_name[index]:"},{"line_number":859,"context_line":"                    if item not in action_info:"},{"line_number":860,"context_line":"                        append_arg \u003d False"},{"line_number":861,"context_line":"                        break"},{"line_number":862,"context_line":"            if not append_arg:"},{"line_number":863,"context_line":"                for arg in arg_name[index]:"},{"line_number":864,"context_line":"                    dup_list.append(arg)"},{"line_number":865,"context_line":"        if dup_list:"},{"line_number":866,"context_line":"            self.log.error(\"Duplicated options found: %s\", dup_list)"},{"line_number":867,"context_line":"            raise SystemExit(1)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_9b400336","line":864,"range":{"start_line":855,"start_character":8,"end_line":864,"end_character":40},"in_reply_to":"3a57f1b5_214527b2","updated":"2016-02-12 08:40:14.000000000","message":"Sorry for the syntax error. I should have ran it in an interpreter before commenting. It\u0027s not just about understandability. I saw it as an efficient alternative. :-)\n\nYou can try this, \n----\ndup_list \u003d [ arg_name[index] for index in arg_count if (arg_count[index] \u003e 1 and not set(arg_name[index]).issubset(action_info)) ]\n----\nand to retain your printing format, you could do,\n----\nself.log.error(\"Duplicated options found: %s\", list(itertools.chain(*dup_list)))\n----","commit_id":"8b494632a083ac8c02baa33091cec0073a295666"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c38b7e172844340a97943b0396e68542f1423f05","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":853,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":854,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":855,"context_line":"        for index in arg_count:"},{"line_number":856,"context_line":"            append_arg \u003d True"},{"line_number":857,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":858,"context_line":"                for item in arg_name[index]:"},{"line_number":859,"context_line":"                    if item not in action_info:"},{"line_number":860,"context_line":"                        append_arg \u003d False"},{"line_number":861,"context_line":"                        break"},{"line_number":862,"context_line":"            if not append_arg:"},{"line_number":863,"context_line":"                for arg in arg_name[index]:"},{"line_number":864,"context_line":"                    dup_list.append(arg)"},{"line_number":865,"context_line":"        if dup_list:"},{"line_number":866,"context_line":"            self.log.error(\"Duplicated options found: %s\", dup_list)"},{"line_number":867,"context_line":"            raise SystemExit(1)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a57f1b5_214527b2","line":864,"range":{"start_line":855,"start_character":8,"end_line":864,"end_character":40},"in_reply_to":"3a57f1b5_a4715ee2","updated":"2016-02-12 05:32:09.000000000","message":"Hi Bharath, \nI tried both the methods.\nThe first one required changes in my display, if I use the same code. Modifying it brings the code back to the similar logic.\nThe second one has some syntactical issues, so cannot use it.\nSo, for now I am sticking with my current code only.\n\nI hope my code is understandable by a novice developer as well.","commit_id":"8b494632a083ac8c02baa33091cec0073a295666"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"f09777714c1dff857aa0cfd12a797eababf8079e","unresolved":false,"context_lines":[{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        \u0027\u0027\u0027"},{"line_number":859,"context_line":"        for index in arg_count:"},{"line_number":860,"context_line":"            append_arg \u003d True"},{"line_number":861,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":862,"context_line":"                for item in arg_name[index]:"},{"line_number":863,"context_line":"                    if item not in action_info:"},{"line_number":864,"context_line":"                        append_arg \u003d False"},{"line_number":865,"context_line":"                        break"},{"line_number":866,"context_line":"            if not append_arg:"},{"line_number":867,"context_line":"                for arg in arg_name[index]:"},{"line_number":868,"context_line":"                    dup_list.append(arg)"},{"line_number":869,"context_line":"        \u0027\u0027\u0027"},{"line_number":870,"context_line":"        dup_list \u003d [arg_name[index] for index in arg_count if ("},{"line_number":871,"context_line":"            arg_count[index] \u003e 1 and not set("},{"line_number":872,"context_line":"                arg_name[index]).issubset(action_info))]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_cb3e7627","line":869,"range":{"start_line":858,"start_character":8,"end_line":869,"end_character":11},"updated":"2016-02-23 00:42:04.000000000","message":"By the way, is this still needed ?","commit_id":"3da7c55b346d395278fc0d29b9aee09852b84708"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"a5d445fbaf0f811e5419f8f9f7e90573c4d72841","unresolved":false,"context_lines":[{"line_number":855,"context_line":"                action_info +\u003d action.option_strings"},{"line_number":856,"context_line":"        # check which arguments have been repeated more than once"},{"line_number":857,"context_line":"        # and verify if those arguments are in the AppendAction list."},{"line_number":858,"context_line":"        \u0027\u0027\u0027"},{"line_number":859,"context_line":"        for index in arg_count:"},{"line_number":860,"context_line":"            append_arg \u003d True"},{"line_number":861,"context_line":"            if arg_count[index] \u003e 1:"},{"line_number":862,"context_line":"                for item in arg_name[index]:"},{"line_number":863,"context_line":"                    if item not in action_info:"},{"line_number":864,"context_line":"                        append_arg \u003d False"},{"line_number":865,"context_line":"                        break"},{"line_number":866,"context_line":"            if not append_arg:"},{"line_number":867,"context_line":"                for arg in arg_name[index]:"},{"line_number":868,"context_line":"                    dup_list.append(arg)"},{"line_number":869,"context_line":"        \u0027\u0027\u0027"},{"line_number":870,"context_line":"        dup_list \u003d [arg_name[index] for index in arg_count if ("},{"line_number":871,"context_line":"            arg_count[index] \u003e 1 and not set("},{"line_number":872,"context_line":"                arg_name[index]).issubset(action_info))]"}],"source_content_type":"text/x-python","patch_set":24,"id":"bae84128_468ffb29","line":869,"range":{"start_line":858,"start_character":8,"end_line":869,"end_character":11},"in_reply_to":"bae84128_cb3e7627","updated":"2016-02-23 01:14:03.000000000","message":"Sorry, forgot to delete it","commit_id":"3da7c55b346d395278fc0d29b9aee09852b84708"}],"neutronclient/tests/unit/test_shell.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a9c7ac575b70b01ac67687902c20d1050879f43b","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        for string in stderr.split():"},{"line_number":539,"context_line":"            if \u0027Duplicate\u0027 in string:"},{"line_number":540,"context_line":"                self.assertIn(string,"},{"line_number":541,"context_line":"                              \"Duplicate parameters found:--protocol\")"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def test_run_cm_with_acceptable_duplicate_parameter(self):"},{"line_number":544,"context_line":"        self.useFixture(fixtures.FakeLogger(level\u003dlogging.DEBUG))"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_5ccf65b0","line":541,"updated":"2015-11-09 08:47:32.000000000","message":"this test would pass if \"Duplicate\" did not appear at all.","commit_id":"00dea0433f021fd3eefb42cfdedc54ec73059fcf"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"09a2baab766e03724f5159714d21acdee0eecd67","unresolved":false,"context_lines":[{"line_number":538,"context_line":"        for string in stderr.split():"},{"line_number":539,"context_line":"            if \u0027Duplicate\u0027 in string:"},{"line_number":540,"context_line":"                self.assertIn(string,"},{"line_number":541,"context_line":"                              \"Duplicate parameters found:--protocol\")"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    def test_run_cm_with_acceptable_duplicate_parameter(self):"},{"line_number":544,"context_line":"        self.useFixture(fixtures.FakeLogger(level\u003dlogging.DEBUG))"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_fc20994b","line":541,"in_reply_to":"da85f559_5ccf65b0","updated":"2015-11-09 08:52:58.000000000","message":"Hi Yamamoto San,\nI will change the following code.\nI had a similar implementation in another code which I changed today.\nDidnt know I had a similar behaviour here as well.","commit_id":"00dea0433f021fd3eefb42cfdedc54ec73059fcf"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"526539c8ef17489b3cf0c043c99c57f8de338cbd","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            \u0027%s port-create --vnic-type direct --vnic-type normal public\u0027 %"},{"line_number":235,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":236,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, expected_val\u003d1)"},{"line_number":237,"context_line":"        search_str \u003d \"Duplicate parameters found:[\u0027--vnic-type\u0027]\""},{"line_number":238,"context_line":"        self.assertTrue(any(search_str in string for string"},{"line_number":239,"context_line":"                            in stderr.split(\u0027\\n\u0027)))"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_9ba32cb2","line":237,"updated":"2015-11-18 13:51:07.000000000","message":"I suggest having 2 or more duplicate parameters for this test.","commit_id":"d7ca5bae1653af21af9132501d5ae4929daa716c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"59662ca0e30f7aa0796ffe7b58d096afa4fbf7a6","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            \u0027%s port-create --vnic-type direct --vnic-type normal public\u0027 %"},{"line_number":235,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":236,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, expected_val\u003d1)"},{"line_number":237,"context_line":"        search_str \u003d \"Duplicate parameters found:[\u0027--vnic-type\u0027]\""},{"line_number":238,"context_line":"        self.assertTrue(any(search_str in string for string"},{"line_number":239,"context_line":"                            in stderr.split(\u0027\\n\u0027)))"},{"line_number":240,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_60174c45","line":237,"in_reply_to":"ba8a016a_9ba32cb2","updated":"2015-11-20 05:03:34.000000000","message":"This took some pinching the code at the right places....\nBut yeah, sure, done","commit_id":"d7ca5bae1653af21af9132501d5ae4929daa716c"}]}
