From a7bb4b71047f2c58a2d4e6241198c8e34e2ccebf Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Mon, 25 May 2015 14:44:15 +0200 Subject: [PATCH] Check for patch existence in Xapi#_getOrUploadPoolPatch(). --- src/xapi.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xapi.js b/src/xapi.js index fd851204f..e89df550a 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -423,6 +423,9 @@ export default class Xapi extends XapiBase { debug('downloading patch %s', uuid) const patchInfo = (await this._getXenUpdates()).patches[uuid] + if (!patchInfo) { + throw new Error('no such patch ' + uuid) + } const PATCH_RE = /\.xsupdate$/ const proxy = new PassThrough()