From d3ea606d71284cdbe8f758ff7e0c59a450421c4e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 8 May 2014 14:29:17 -0400 Subject: [PATCH] Correct return value of set_bootdev command would return a number rather than a string for set_bootdev. Correct this by returning the string passed in on success rather than the resulting number. Change-Id: I8e76b1ac9d0222630abe6b160e6271b13ef4987d --- pyghmi/ipmi/command.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 04a6b0c7..ea7f3f3c 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -235,7 +235,7 @@ class Command(object): """ if bootdev not in boot_devices: return {'error': "Unknown bootdevice %s requested" % bootdev} - bootdev = boot_devices[bootdev] + bootdevnum = boot_devices[bootdev] # first, we disable timer by way of set system boot options, # then move on to set chassis capabilities # Set System Boot Options is netfn=0, command=8, data @@ -247,9 +247,9 @@ class Command(object): bootflags |= 1 << 5 if persist: bootflags |= 1 << 6 - if bootdev == 0: + if bootdevnum == 0: bootflags = 0 - data = (5, bootflags, bootdev, 0, 0, 0) + data = (5, bootflags, bootdevnum, 0, 0, 0) response = self.raw_command(netfn=0, command=8, data=data) if 'error' in response: return response