File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -495,9 +495,11 @@ def __get_execution_context(entry):
495
495
def one_loop (self , command_args ):
496
496
logger .debug ("ARGS: %s" % command_args )
497
497
498
+ first_keyword = command_args [0 ]
499
+
498
500
entry = self ._get_cli_entry_from_args (command_args )
499
501
if entry is None :
500
- self .print_list (command_args [ 0 ] )
502
+ self .print_list (first_keyword )
501
503
sys .exit (2 )
502
504
503
505
command_args = self .clean_command_args (command_args )
@@ -506,6 +508,11 @@ def one_loop(self, command_args):
506
508
command_parser = optparse .OptionParser ('' , version = "%prog " + VERSION )
507
509
command_parser .prog = ''
508
510
511
+ # Maybe it's not a end node, and we are in the middle, like "opsbro gossip zone"
512
+ if not isinstance (entry , CLIEntry ):
513
+ self .print_list (first_keyword )
514
+ sys .exit (2 )
515
+
509
516
for a in entry .args :
510
517
n = a .get ('name' , None )
511
518
if n is None :
You can’t perform that action at this time.
0 commit comments