Skip to content

Commit ff3b358

Browse files
author
Mathieu
committed
only HTTPError (inherit from ULRError) has read and headers attributes
1 parent 3af3d02 commit ff3b358

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shotgun_api3/shotgun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ def download_attachment(self, attachment=False, file_path=None, attachment_id=No
26892689
attachment = req.read()
26902690
# 400 [sg] Attachment id doesn't exist or is a local file
26912691
# 403 [s3] link is invalid
2692-
except urllib.error.URLError as e:
2692+
except urllib.error.HTTPError as e:
26932693
if file_path:
26942694
fp.close()
26952695
err = f"Failed to open {url}\n{e}"

0 commit comments

Comments
 (0)