-
Notifications
You must be signed in to change notification settings - Fork 435
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
Handle file
objects like file_upload
#477
Conversation
LGTM! |
Pushed another commit to only use |
stripe.api_base = None | ||
yield | ||
stripe.api_base = stripe.upload_api_base | ||
stripe.upload_api_base = 'https://files.stripe.com' |
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.
I'm not too familiar with the framework here, but are you sure this doesn't need to be in a finally
to guarantee that these values are set back in case of an exception?
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.
Just tested it, and it's not necessary. The framework already catches exceptions in tests and reports them as errors, and still executes the post-yield
code.
Left a minor comment above, but otherwise LGTM! |
dfc50bc
to
94d6331
Compare
r? @brandur-stripe
cc @stripe/api-libraries
Exactly like stripe/stripe-ruby#689, but for Python.