Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
make sure verbose, etc is always used
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Jul 24, 2020
1 parent fc69383 commit fbd0582
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli4/cli4.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
import CloudFlare
from . import converters

def dump_commands():
def dump_commands(cf):
"""dump a tree of all the known API commands"""
cf = CloudFlare.CloudFlare()
w = cf.api_list()
sys.stdout.write('\n'.join(w) + '\n')

def dump_commands_from_web():
def dump_commands_from_web(cf):
"""dump a tree of all the known API commands - from web"""
cf = CloudFlare.CloudFlare()
w = cf.api_from_web()
for r in w:
if r['deprecated']:
Expand Down Expand Up @@ -340,11 +338,13 @@ def do_it(args):
method = 'DELETE'

if dump:
dump_commands()
cf = CloudFlare.CloudFlare(debug=verbose, raw=raw, profile=profile)
dump_commands(cf)
sys.exit(0)

if dump_from_web:
dump_commands_from_web()
cf = CloudFlare.CloudFlare(debug=verbose, raw=raw, profile=profile)
dump_commands_from_web(cf)
sys.exit(0)

digits_only = re.compile('^-?[0-9]+$')
Expand Down

0 comments on commit fbd0582

Please sign in to comment.