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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pydrive/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ def Upload(self, param=None):
self._FilesPatch(param=param)
else:
self._FilesInsert(param=param)
try:
self.content.close()
except AttributeError:
pass

def Trash(self, param=None):
"""Move a file to the trash.
Expand Down