From bc85b346e3cb5c9ba3398062885af8d118ca3726 Mon Sep 17 00:00:00 2001 From: Tyson Smith Date: Thu, 26 Sep 2024 13:02:51 -0700 Subject: [PATCH] fix: improve handling of Bugzilla response --- grizzly/common/bugzilla.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grizzly/common/bugzilla.py b/grizzly/common/bugzilla.py index 2f32b23e..e63ab183 100644 --- a/grizzly/common/bugzilla.py +++ b/grizzly/common/bugzilla.py @@ -53,11 +53,12 @@ def _fetch_attachments(self) -> None: if ( attachment.is_obsolete or attachment.content_type == "text/x-phabricator-request" + or not attachment.file_name or attachment.file_name.split(".")[-1] in IGNORE_EXTS ): continue try: - data = b64decode(attachment.data) + data = b64decode(attachment.data or "") except binascii.Error as exc: LOG.warning( "Failed to decode attachment: %r (%s)", attachment.file_name, exc