mirror of https://git.48k.eu/ogcli/
Add alias "set mode"
"ogcli set modes ..." should be "ogcli set mode ..." because clients only have one mode assigned at a time. To not break the backwards compatibility, this commits adds "set mode" but maintains "set modes".master
parent
01ed5a3039
commit
a2f1056c40
|
@ -74,12 +74,12 @@ class OgCLI():
|
|||
OgDisk.list_disks(self.rest, args[1:])
|
||||
|
||||
def set(self, args):
|
||||
choices = ['modes']
|
||||
choices = ['modes', 'mode']
|
||||
parser = argparse.ArgumentParser(prog='ogcli set')
|
||||
parser.add_argument('item', choices=choices)
|
||||
parsed_args = parser.parse_args([args[0]])
|
||||
|
||||
if parsed_args.item == 'modes':
|
||||
if parsed_args.item in choices:
|
||||
OgModes.set_modes(self.rest, args[1:])
|
||||
|
||||
def send(self, args):
|
||||
|
|
Loading…
Reference in New Issue