fix(xo-server/_getXenUpdates): call readAll with context (#3897)
This commit is contained in:
parent
b246e84c48
commit
f26f8b2af9
@ -29,15 +29,15 @@ export default {
|
|||||||
// FIXME: should be static
|
// FIXME: should be static
|
||||||
@debounce(24 * 60 * 60 * 1000)
|
@debounce(24 * 60 * 60 * 1000)
|
||||||
async _getXenUpdates() {
|
async _getXenUpdates() {
|
||||||
const { readAll, statusCode } = await this.xo.httpRequest(
|
const response = await this.xo.httpRequest(
|
||||||
'http://updates.xensource.com/XenServer/updates.xml'
|
'http://updates.xensource.com/XenServer/updates.xml'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (statusCode !== 200) {
|
if (response.statusCode !== 200) {
|
||||||
throw new Error('cannot fetch patches list from Citrix')
|
throw new Error('cannot fetch patches list from Citrix')
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = parseXml(await readAll()).patchdata
|
const data = parseXml(await response.readAll()).patchdata
|
||||||
|
|
||||||
const patches = { __proto__: null }
|
const patches = { __proto__: null }
|
||||||
forEach(data.patches.patch, patch => {
|
forEach(data.patches.patch, patch => {
|
||||||
|
Loading…
Reference in New Issue
Block a user