diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 35f60923c594..134840335abf 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -93,6 +93,10 @@ def _download_tarball(request, staging_path): raise RetryException(error) except urllib2.URLError, error: raise RetryException(error) + except httplib.HTTPException, error: + # httplib.HTTPException and derivatives (BadStatusLine in particular) + # don't have a useful __repr__ or __str__ + raise RetryException('%s: %s' % (error.__class__.__name__, error)) tar_cmd = "tar -zx --directory=%(staging_path)s" % locals() tar_proc = _make_subprocess(tar_cmd, stderr=True, stdin=True)