usbboot: Fix linter

Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@balena.io>
This commit is contained in:
Juan Cruz Viotti 2019-03-17 15:28:56 +00:00
parent dad05b4743
commit 3258807992
No known key found for this signature in database
GPG Key ID: D01B10083038B3E8
2 changed files with 5 additions and 4 deletions

View File

@ -449,10 +449,10 @@ class USBBootAdapter extends EventEmitter {
message: 'LIBUSB_TRANSFER_CANCELLED'
}, {
message: 'LIBUSB_ERROR_NO_DEVICE'
}, ((error) => {
}, (error) => {
debug(`Swallowed error: ${error.message} ${error.stack}`)
return null
})).tap((result) => {
}).tap((result) => {
if (result) {
result.close()
}

View File

@ -74,9 +74,10 @@ exports.listDevices = () => {
return device
})
console.log(devices.map((device) => {
console.log(_.map(devices, (device) => {
const descriptor = device.deviceDescriptor
return `${descriptor.idVendor.toString(16)}:${descriptor.idProduct.toString(16)}`
const HEX_BASE = 16
return `${descriptor.idVendor.toString(HEX_BASE)}:${descriptor.idProduct.toString(HEX_BASE)}`
}))
// Include driverless devices into the list of USB devices.