Address Copilot review comments
- Add missing parentheses to .execute() method call - Remove redundant pass statement after logger.debug - Keep urlsafe_b64decode() for consistency with codebase convention Note: Copilot suggested using b64decode() instead of urlsafe_b64decode(), but the codebase consistently uses urlsafe_b64decode() for Gmail message body data (lines 72, 87 in gmail_tools.py). We follow the existing codebase convention for consistency.
This commit is contained in:
@@ -721,7 +721,7 @@ async def get_gmail_attachment_content(
|
|||||||
service.users()
|
service.users()
|
||||||
.messages()
|
.messages()
|
||||||
.get(userId="me", id=message_id, format="metadata")
|
.get(userId="me", id=message_id, format="metadata")
|
||||||
.execute
|
.execute()
|
||||||
)
|
)
|
||||||
payload = message_metadata.get("payload", {})
|
payload = message_metadata.get("payload", {})
|
||||||
attachments = _extract_attachments(payload)
|
attachments = _extract_attachments(payload)
|
||||||
@@ -733,7 +733,6 @@ async def get_gmail_attachment_content(
|
|||||||
except Exception:
|
except Exception:
|
||||||
# If we can't get metadata, use defaults
|
# If we can't get metadata, use defaults
|
||||||
logger.debug(f"Could not fetch attachment metadata for {attachment_id}, using defaults")
|
logger.debug(f"Could not fetch attachment metadata for {attachment_id}, using defaults")
|
||||||
pass
|
|
||||||
|
|
||||||
# Save attachment
|
# Save attachment
|
||||||
file_id = storage.save_attachment(
|
file_id = storage.save_attachment(
|
||||||
|
|||||||
Reference in New Issue
Block a user