2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-09 04:56:12 +00:00

Correct some errors in the previous commit

This commit is contained in:
Jarrod Johnson 2017-12-08 18:27:35 -05:00
parent 09d20ea1ff
commit b18ad89672

View File

@ -409,7 +409,7 @@ def get_input_message(path, operation, inputdata, nodes=None, multinode=False,
return InputFirmwareUpdate(path, nodes, inputdata)
elif '/'.join(path).startswith('media/detach'):
return DetachMedia(path, nodes, inputdata)
elif '/'.join(path).startswith('media/'):
elif '/'.join(path).startswith('media/') and inputdata:
return InputMedia(path, nodes, inputdata)
elif inputdata:
raise exc.InvalidArgumentException(
@ -418,7 +418,7 @@ def get_input_message(path, operation, inputdata, nodes=None, multinode=False,
class InputFirmwareUpdate(ConfluentMessage):
def __init__(self, path, nodes, inputdata):
self.filename = inputdata.get('filename', inputdata['url'])
self.filename = inputdata.get('filename', inputdata.get('url', None))
self.bank = inputdata.get('bank', None)
self.nodes = nodes