Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: convert ints to strings before write #829

Merged
merged 1 commit into from
Jul 1, 2014
Merged

bugfix: convert ints to strings before write #829

merged 1 commit into from
Jul 1, 2014

Conversation

tgolly
Copy link
Contributor

@tgolly tgolly commented Jun 27, 2014

Minor bugfix.

When using "--output text", if the value returned is an integer, this error is returned:

# aws ec2 describe-volumes --volume-ids $VOL_ID --query 'Volumes[0].Size' --output json
10
# aws ec2 describe-volumes --volume-ids $VOL_ID --query 'Volumes[0].Size' --output text

argument 1 must be string or read-only character buffer, not int

This patch ensures the value is converted to a string before .write. After patch:

# aws ec2 describe-volumes --volume-ids $VOL_ID --query 'Volumes[0].Size' --output text
10

Ensures all scalar values (like ints) are converted to string types before write.
@jamesls
Copy link
Member

jamesls commented Jun 30, 2014

Thanks for the PR. Just needs a few unit tests that demonstrate the bugfix. These should be pretty small so I'll go ahead and write them real quick before merging in.

@jamesls jamesls merged commit 9bb39c0 into aws:develop Jul 1, 2014
jamesls added a commit that referenced this pull request Jul 1, 2014
jamesls added a commit that referenced this pull request Jul 1, 2014
jamesls added a commit that referenced this pull request Jul 1, 2014
* tgolly-patch-1:
  Add changelog entry for #829
  Add unittests for #829
  bugfix: convert ints to strings before write
@jamesls
Copy link
Member

jamesls commented Jul 1, 2014

Merged, thanks!

@tgolly tgolly deleted the patch-1 branch July 1, 2014 00:48
jamesls added a commit that referenced this pull request Jul 1, 2014
* release-1.3.21:
  Bumping version to 1.3.21
  Add changelog entry for #829
  Add unittests for #829
  Update changelog with opsworks update
  Update changelog
  Fix single item shorthand list parsing bug
  bugfix: convert ints to strings before write
  Update changelog with issue 828
  Don't validate --endpoint-url for help subcommand
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants