Handle more exceptions
This commit is contained in:
parent
3720eacf13
commit
c6a430a44d
|
|
@ -289,8 +289,7 @@ class GoogleDriveHelper:
|
|||
msg = ""
|
||||
LOGGER.info(f"File ID: {file_id}")
|
||||
try:
|
||||
meta = self.__service.files().get(supportsAllDrives=True, fileId=file_id,
|
||||
fields="name,id,mimeType,size").execute()
|
||||
meta = self.getFileMetadata(file_id)
|
||||
except Exception as e:
|
||||
return f"{str(e).replace('>', '').replace('<', '')}"
|
||||
if meta.get("mimeType") == self.__G_DRIVE_DIR_MIME_TYPE:
|
||||
|
|
|
|||
Loading…
Reference in New Issue