diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 66e361b5ce24..1da5be5b0828 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -212,12 +212,11 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port, compression_level = properties.get('xenapi_image_compression_level') - try: - utils.create_tarball( - None, staging_path, callback=send_chunked_transfer_encoded, - compression_level=compression_level) - finally: - send_chunked_transfer_encoded('') # Chunked-Transfer terminator + utils.create_tarball( + None, staging_path, callback=send_chunked_transfer_encoded, + compression_level=compression_level) + + send_chunked_transfer_encoded('') # Chunked-Transfer terminator bytes_written = callback_data['bytes_written'] logging.info("Wrote %d bytes to %s" % (bytes_written, url))