Skip to content

Commit 5e25637

Browse files
committed
Fixes to work with Click v5
1 parent 3b351cd commit 5e25637

90 files changed

Lines changed: 117 additions & 126 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SoftLayer/CLI/call_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ def cli(env, service, method, parameters, _id, mask, limit, offset):
3131
mask=mask,
3232
limit=limit,
3333
offset=offset)
34-
return formatting.iter_to_table(result)
34+
env.fout(formatting.iter_to_table(result))

SoftLayer/CLI/cdn/detail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ def cli(env, account_id):
2929
table.add_row(['notes',
3030
account.get('cdnAccountNote', formatting.blank())])
3131

32-
return table
32+
env.fout(table)

SoftLayer/CLI/cdn/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ def cli(env, sortby):
4040
])
4141

4242
table.sortby = sortby
43-
return table
43+
env.fout(table)

SoftLayer/CLI/cdn/origin_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ def cli(env, account_id):
2525
origin.get('cname', formatting.blank()),
2626
origin['originUrl']])
2727

28-
return table
28+
env.fout(table)

SoftLayer/CLI/config/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def cli(env):
8888
finally:
8989
config_fd.close()
9090

91-
return "Configuration Updated Successfully"
91+
env.fout("Configuration Updated Successfully")
9292

9393

9494
def get_user_input(env):

SoftLayer/CLI/config/show.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ def cli(env):
1313
"""Show current configuration."""
1414

1515
settings = config.get_settings_from_client(env.client)
16-
return config.config_table(settings)
16+
env.fout(config.config_table(settings))

SoftLayer/CLI/core.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,9 @@ def cli(env,
154154

155155
@cli.resultcallback()
156156
@environment.pass_env
157-
def output_result(env, result, timings=False, **kwargs):
157+
def output_result(env, timings=False, *args, **kwargs):
158158
"""Outputs the results returned by the CLI and also outputs timings."""
159159

160-
output = env.fmt(result)
161-
if output:
162-
env.out(output)
163-
164160
if timings:
165161
timing_table = formatting.Table(['service', 'method', 'time'])
166162

SoftLayer/CLI/dns/record_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ def cli(env, zone, data, record, ttl, type):
4646
record['data']
4747
])
4848

49-
return table
49+
env.fout(table)

SoftLayer/CLI/dns/zone_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ def cli(env):
2727
zone['updateDate'],
2828
])
2929

30-
return table
30+
env.fout(table)

SoftLayer/CLI/dns/zone_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def cli(env, zone):
1616

1717
manager = SoftLayer.DNSManager(env.client)
1818
zone_id = helpers.resolve_id(manager.resolve_ids, zone, name='zone')
19-
return manager.dump_zone(zone_id)
19+
env.fout(manager.dump_zone(zone_id))

0 commit comments

Comments
 (0)