This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,7 +386,8 @@ def do_it(args):
386386 output = 'json'
387387 example = False
388388 raw = False
389- dump = False
389+ do_dump = False
390+ do_openapi = None
390391 openapi_url = None
391392 binary_file = False
392393 profile = None
@@ -453,9 +454,10 @@ def do_it(args):
453454 elif opt in ('-p' , '--profile' ):
454455 profile = arg
455456 elif opt in ('-d' , '--dump' ):
456- dump = True
457+ do_dump = True
457458 elif opt in ('-A' , '--openapi' ):
458- openapi_url = arg
459+ do_openapi = True
460+ openapi_url = arg if arg != '' else None
459461 elif opt in ('-b' , '--binary' ):
460462 binary_file = True
461463 elif opt in ('-G' , '--get' ):
@@ -481,12 +483,12 @@ def do_it(args):
481483 except Exception as e :
482484 sys .exit (e )
483485
484- if dump :
486+ if do_dump :
485487 a = dump_commands (cf )
486488 sys .stdout .write (a )
487489 sys .exit (0 )
488490
489- if openapi_url :
491+ if do_openapi :
490492 a = dump_commands_from_web (cf , openapi_url )
491493 sys .stdout .write (a )
492494 sys .exit (0 )
You can’t perform that action at this time.
0 commit comments