Merge pull request #1201 from gvlproject/fix_console_filter_regression
Fix for regression in get_console_output()
This commit is contained in:
commit
72243f7b7b
2 changed files with 19 additions and 3 deletions
|
|
@ -5,7 +5,12 @@ from moto.core.responses import BaseResponse
|
|||
class General(BaseResponse):
|
||||
|
||||
def get_console_output(self):
|
||||
instance_id = self._get_multi_param('InstanceId')[0]
|
||||
instance_id = self._get_param('InstanceId')
|
||||
if not instance_id:
|
||||
# For compatibility with boto.
|
||||
# See: https://github.com/spulec/moto/pull/1152#issuecomment-332487599
|
||||
instance_id = self._get_multi_param('InstanceId')[0]
|
||||
|
||||
instance = self.ec2_backend.get_instance(instance_id)
|
||||
template = self.response_template(GET_CONSOLE_OUTPUT_RESULT)
|
||||
return template.render(instance=instance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue