2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 21:23:18 +00:00

Fix internal error on boot device mistake

Boot device not being str resulted in internal error rather than the
intended message.  Correct by forcing it to string representation.
This commit is contained in:
Jarrod Johnon 2015-01-13 08:59:48 -05:00
parent 10369decf8
commit 09c5b90c57

View File

@ -393,9 +393,11 @@ class BootDevice(ConfluentChoiceMessage):
def __init__(self, node, device, bootmode='unspecified'):
if device not in self.valid_values:
raise Exception("Invalid boot device argument passed in:" + device)
raise Exception("Invalid boot device argument passed in:" +
repr(device))
if bootmode not in self.valid_bootmodes:
raise Exception("Invalid boot mode argument passed in:" + bootmode)
raise Exception("Invalid boot mode argument passed in:" +
repr(bootmode))
self.kvpairs = {
node: {
'nextdevice': {'value': device},