From e5d88be8cb98298323b4644dff08b38fc970f1cd Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Wed, 11 Feb 2015 14:20:02 -0800 Subject: Log required troubleshooting info on image dl fail Currently, we only log the image ID and attempted URL. Now, we log the status code recieved and detailed information about how and when things failed. Change-Id: I718c7facbe1500d98be78b7b6137e92fdfb2fdf1 Closes-bug: 1420981 Depends-On: I69f6f6eef4ad573f406d64d579a9811c70ac5d28 --- ironic_python_agent/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ironic_python_agent/errors.py') diff --git a/ironic_python_agent/errors.py b/ironic_python_agent/errors.py index 5ec2e3bf..f21678d4 100644 --- a/ironic_python_agent/errors.py +++ b/ironic_python_agent/errors.py @@ -137,8 +137,8 @@ class ImageDownloadError(RESTError): message = 'Error downloading image.' - def __init__(self, image_id): - details = 'Could not download image with id {0}.'.format(image_id) + def __init__(self, image_id, msg): + details = 'Download of image id {0} failed: {1}'.format(image_id, msg) super(ImageDownloadError, self).__init__(details) -- cgit v1.2.1