prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Version 1.11.17 and above breaks EC2 describe volumes with JSON input
  Related Issue: #1976 
  
  JSON File:
  ```json
  {
    "VolumeIds": [
      "vol-<id>"
    ]
  }
  ```
  
  Command:
  ```
  aws ec2 describe-volumes --region <region> --cli-input-json file://<file-name>.json
  ```
  
  Error Message:
  ```
  An error occurred (InvalidParameterCombination) when calling the DescribeVolumes operation: The parameter volumeSet cannot be used with the parameter maxResults
  ```
  
  OS Release:
  ```
  NAME="Amazon Linux AMI"
  VERSION="2016.09"
  ID="amzn"
  ID_LIKE="rhel fedora"
  VERSION_ID="2016.09"
  PRETTY_NAME="Amazon Linux AMI 2016.09"
  ANSI_COLOR="0;33"
  CPE_NAME="cpe:/o:amazon:linux:2016.09:ga"
  HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
  ```
  
  Works:
  ```
  python27-botocore-1.4.46-1.58.amzn1.noarch
  aws-cli-1.10.56-1.41.amzn1.noarch
  ```
  
  Breaks:
  ```
  python27-botocore-1.4.74-1.60.amzn1.noarch
  aws-cli-1.11.17-1.43.amzn1.noarch
  ```
  ```
  python27-botocore-1.4.86-1.62.amzn1.noarch
  aws-cli-1.11.29-1.45.amzn1.noarch
  ```
  
  
  </issue>
  <code>
  [start of awscli/customizations/cliinputjson.py]
  1 # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License"). You
  4 # may not use this file except in compliance with the License. A copy of
  5 # the License is located at
  6 #
  7 #     http://aws.amazon.com/apache2.0/
  8 #
  9 # or in the "license" file accompanying this file. This file is
  10 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  11 # ANY KIND, either express or implied. See the License for the specific
  12 # language governing permissions and limitations under the License.
  13 import json
  14 
  15 from awscli.paramfile import get_paramfile
  16 from awscli.argprocess import ParamError
  17 from awscli.customizations.arguments import OverrideRequiredArgsArgument
  18 
  19 
  20 def register_cli_input_json(cli):
  21     cli.register('building-argument-table', add_cli_input_json)
  22 
  23 
  24 def add_cli_input_json(session, argument_table, **kwargs):
  25     # This argument cannot support operations with streaming output which
  26     # is designated by the argument name `outfile`.
  27     if 'outfile' not in argument_table:
  28         cli_input_json_argument = CliInputJSONArgument(session)
  29         cli_input_json_argument.add_to_arg_table(argument_table)
  30 
  31 
  32 class CliInputJSONArgument(OverrideRequiredArgsArgument):
  33     """This argument inputs a JSON string as the entire input for a command.
  34 
  35     Ideally, the value to this argument should be a filled out JSON file
  36     generated by ``--generate-cli-skeleton``. The items in the JSON string
  37     will not clobber other arguments entered into the command line.
  38     """
  39     ARG_DATA = {
  40         'name': 'cli-input-json',
  41         'help_text': 'Performs service operation based on the JSON string '
  42                      'provided. The JSON string follows the format provided '
  43                      'by ``--generate-cli-skeleton``. If other arguments are '
  44                      'provided on the command line, the CLI values will override '
  45                      'the JSON-provided values.'
  46     }
  47 
  48     def __init__(self, session):
  49         super(CliInputJSONArgument, self).__init__(session)
  50 
  51     def _register_argument_action(self):
  52         self._session.register(
  53             'calling-command', self.add_to_call_parameters)
  54         super(CliInputJSONArgument, self)._register_argument_action()
  55 
  56     def add_to_call_parameters(self, call_parameters, parsed_args,
  57                                parsed_globals, **kwargs):
  58 
  59         # Check if ``--cli-input-json`` was specified in the command line.
  60         input_json = getattr(parsed_args, 'cli_input_json', None)
  61         if input_json is not None:
  62             # Retrieve the JSON from the file if needed.
  63             retrieved_json = get_paramfile(input_json)
  64             # Nothing was retrieved from the file. So assume the argument
  65             # is already a JSON string.
  66             if retrieved_json is None:
  67                 retrieved_json = input_json
  68             try:
  69                 # Try to load the JSON string into a python dictionary
  70                 input_data = json.loads(retrieved_json)
  71             except ValueError as e:
  72                 raise ParamError(
  73                     self.name, "Invalid JSON: %s\nJSON received: %s"
  74                     % (e, retrieved_json))
  75             # Add the members from the input JSON to the call parameters.
  76             self._update_call_parameters(call_parameters, input_data)
  77 
  78     def _update_call_parameters(self, call_parameters, input_data):
  79         for input_key in input_data.keys():
  80             # Only add the values to ``call_parameters`` if not already
  81             # present.
  82             if input_key not in call_parameters:
  83                 call_parameters[input_key] = input_data[input_key]
  84
  [end of awscli/customizations/cliinputjson.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/awscli/customizations/cliinputjson.py b/awscli/customizations/cliinputjson.py
  --- a/awscli/customizations/cliinputjson.py
  +++ b/awscli/customizations/cliinputjson.py
  @@ -50,7 +50,7 @@
   
       def _register_argument_action(self):
           self._session.register(
  -            'calling-command', self.add_to_call_parameters)
  +            'calling-command.*', self.add_to_call_parameters)
           super(CliInputJSONArgument, self)._register_argument_action()
   
       def add_to_call_parameters(self, call_parameters, parsed_args,
  
verification_info: {"golden_diff": "diff --git a/awscli/customizations/cliinputjson.py b/awscli/customizations/cliinputjson.py\n--- a/awscli/customizations/cliinputjson.py\n+++ b/awscli/customizations/cliinputjson.py\n@@ -50,7 +50,7 @@\n \n     def _register_argument_action(self):\n         self._session.register(\n-            'calling-command', self.add_to_call_parameters)\n+            'calling-command.*', self.add_to_call_parameters)\n         super(CliInputJSONArgument, self)._register_argument_action()\n \n     def add_to_call_parameters(self, call_parameters, parsed_args,\n", "issue": "Version 1.11.17 and above breaks EC2 describe volumes with JSON input\nRelated Issue: #1976 \r\n\r\nJSON File:\r\n```json\r\n{\r\n  \"VolumeIds\": [\r\n    \"vol-<id>\"\r\n  ]\r\n}\r\n```\r\n\r\nCommand:\r\n```\r\naws ec2 describe-volumes --region <region> --cli-input-json file://<file-name>.json\r\n```\r\n\r\nError Message:\r\n```\r\nAn error occurred (InvalidParameterCombination) when calling the DescribeVolumes operation: The parameter volumeSet cannot be used with the parameter maxResults\r\n```\r\n\r\nOS Release:\r\n```\r\nNAME=\"Amazon Linux AMI\"\r\nVERSION=\"2016.09\"\r\nID=\"amzn\"\r\nID_LIKE=\"rhel fedora\"\r\nVERSION_ID=\"2016.09\"\r\nPRETTY_NAME=\"Amazon Linux AMI 2016.09\"\r\nANSI_COLOR=\"0;33\"\r\nCPE_NAME=\"cpe:/o:amazon:linux:2016.09:ga\"\r\nHOME_URL=\"http://aws.amazon.com/amazon-linux-ami/\"\r\n```\r\n\r\nWorks:\r\n```\r\npython27-botocore-1.4.46-1.58.amzn1.noarch\r\naws-cli-1.10.56-1.41.amzn1.noarch\r\n```\r\n\r\nBreaks:\r\n```\r\npython27-botocore-1.4.74-1.60.amzn1.noarch\r\naws-cli-1.11.17-1.43.amzn1.noarch\r\n```\r\n```\r\npython27-botocore-1.4.86-1.62.amzn1.noarch\r\naws-cli-1.11.29-1.45.amzn1.noarch\r\n```\r\n\n", "before_files": [{"content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n#     http://aws.amazon.com/apache2.0/\n#\n# or in the \"license\" file accompanying this file. This file is\n# distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\nimport json\n\nfrom awscli.paramfile import get_paramfile\nfrom awscli.argprocess import ParamError\nfrom awscli.customizations.arguments import OverrideRequiredArgsArgument\n\n\ndef register_cli_input_json(cli):\n    cli.register('building-argument-table', add_cli_input_json)\n\n\ndef add_cli_input_json(session, argument_table, **kwargs):\n    # This argument cannot support operations with streaming output which\n    # is designated by the argument name `outfile`.\n    if 'outfile' not in argument_table:\n        cli_input_json_argument = CliInputJSONArgument(session)\n        cli_input_json_argument.add_to_arg_table(argument_table)\n\n\nclass CliInputJSONArgument(OverrideRequiredArgsArgument):\n    \"\"\"This argument inputs a JSON string as the entire input for a command.\n\n    Ideally, the value to this argument should be a filled out JSON file\n    generated by ``--generate-cli-skeleton``. The items in the JSON string\n    will not clobber other arguments entered into the command line.\n    \"\"\"\n    ARG_DATA = {\n        'name': 'cli-input-json',\n        'help_text': 'Performs service operation based on the JSON string '\n                     'provided. The JSON string follows the format provided '\n                     'by ``--generate-cli-skeleton``. If other arguments are '\n                     'provided on the command line, the CLI values will override '\n                     'the JSON-provided values.'\n    }\n\n    def __init__(self, session):\n        super(CliInputJSONArgument, self).__init__(session)\n\n    def _register_argument_action(self):\n        self._session.register(\n            'calling-command', self.add_to_call_parameters)\n        super(CliInputJSONArgument, self)._register_argument_action()\n\n    def add_to_call_parameters(self, call_parameters, parsed_args,\n                               parsed_globals, **kwargs):\n\n        # Check if ``--cli-input-json`` was specified in the command line.\n        input_json = getattr(parsed_args, 'cli_input_json', None)\n        if input_json is not None:\n            # Retrieve the JSON from the file if needed.\n            retrieved_json = get_paramfile(input_json)\n            # Nothing was retrieved from the file. So assume the argument\n            # is already a JSON string.\n            if retrieved_json is None:\n                retrieved_json = input_json\n            try:\n                # Try to load the JSON string into a python dictionary\n                input_data = json.loads(retrieved_json)\n            except ValueError as e:\n                raise ParamError(\n                    self.name, \"Invalid JSON: %s\\nJSON received: %s\"\n                    % (e, retrieved_json))\n            # Add the members from the input JSON to the call parameters.\n            self._update_call_parameters(call_parameters, input_data)\n\n    def _update_call_parameters(self, call_parameters, input_data):\n        for input_key in input_data.keys():\n            # Only add the values to ``call_parameters`` if not already\n            # present.\n            if input_key not in call_parameters:\n                call_parameters[input_key] = input_data[input_key]\n", "path": "awscli/customizations/cliinputjson.py"}]}