-
Notifications
You must be signed in to change notification settings - Fork 538
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
Preconditions Script Checks Billing Account Format #117
Preconditions Script Checks Billing Account Format #117
Conversation
json.dump accepts file object as second argument and writes to it. There's no need to call `print` since it's writing to stdout.
This will make the program fail faster should an obviously incorrect value be passed as the billing account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with preconditions.sh --billing_account FOO
.
@morgante I believe this is ready to merge. I just resolved a conflict with master. Doing so dismissed @aaron-lane's review, however, the changes that were previously approved are the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good. There are unrelated issues causing tests/CI to fail, so for the sake of best practices we should resolve that first - once done let's get this merged.
Preconditions script checks that billing account is in the correct format. This will make the program fail faster should an obviously incorrect value be passed as the billing account.
In addition, this changes the
json.dumps
call tojson.dump
in themain
method. This was failing with aTypeError
since onlydump
accepts a second positional argument of a file-like object to write to.