Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit fbd0582

Browse files
committed
make sure verbose, etc is always used
1 parent fc69383 commit fbd0582

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cli4/cli4.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@
1717
import CloudFlare
1818
from . import converters
1919

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

26-
def dump_commands_from_web():
25+
def dump_commands_from_web(cf):
2726
"""dump a tree of all the known API commands - from web"""
28-
cf = CloudFlare.CloudFlare()
2927
w = cf.api_from_web()
3028
for r in w:
3129
if r['deprecated']:
@@ -340,11 +338,13 @@ def do_it(args):
340338
method = 'DELETE'
341339

342340
if dump:
343-
dump_commands()
341+
cf = CloudFlare.CloudFlare(debug=verbose, raw=raw, profile=profile)
342+
dump_commands(cf)
344343
sys.exit(0)
345344

346345
if dump_from_web:
347-
dump_commands_from_web()
346+
cf = CloudFlare.CloudFlare(debug=verbose, raw=raw, profile=profile)
347+
dump_commands_from_web(cf)
348348
sys.exit(0)
349349

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

0 commit comments

Comments
 (0)