Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Added a try except block at the end of the Upload() method, trying to… #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bonny1992
Copy link

… close the file. If it's not a file, discard the error.

Sorry if not 100% correct but I'm not familiar with pull requests.

… close the file. If it's not a file, discard the error.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@bonny1992
Copy link
Author

bonny1992 commented Sep 13, 2018 via email

@googlebot
Copy link

CLAs look good, thanks!

@erickoledadevrel
Copy link
Contributor

Sorry for the very long delay getting to this PR. It seems like this would cause a problem if you called Upload twice on the same file object. I'm not sure if there are valid uses for that, but the interface doesn't prevent it.

@erickoledadevrel erickoledadevrel self-assigned this Jan 25, 2019
Copy link

@csimmons0 csimmons0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not move the open() call out of SetFileContent and into Upload, and remove the try-except?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants