Skip to content

Commit 11b478f

Browse files
author
Flavio Fernandes
committed
virtual detail: add logging
From code review request. Thanks Christopher!
1 parent 7a3af08 commit 11b478f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SoftLayer/CLI/virt/detail.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Get details for a virtual server."""
22
# :license: MIT, see LICENSE for more details.
33

4+
import logging
5+
46
import click
57

68
import SoftLayer
@@ -9,6 +11,8 @@
911
from SoftLayer.CLI import helpers
1012
from SoftLayer import utils
1113

14+
LOGGER = logging.getLogger(__name__)
15+
1216

1317
@click.command()
1418
@click.argument('identifier')
@@ -152,6 +156,7 @@ def _cli_helper_dedicated_host(env, result, table):
152156
dedicated_host = env.client.call('Virtual_DedicatedHost', 'getObject',
153157
id=dedicated_host_id)
154158
except SoftLayer.SoftLayerAPIError:
159+
LOGGER.error('Unable to get dedicated host id %s', dedicated_host_id)
155160
dedicated_host = {}
156161
table.add_row(['dedicated_host',
157162
dedicated_host.get('name') or formatting.blank()])

0 commit comments

Comments
 (0)