diff options
author | ZhiQiang Fan <zhiqiang.fan@huawei.com> | 2013-12-25 20:50:34 +0800 |
---|---|---|
committer | ZhiQiang Fan <zhiqiang.fan@huawei.com> | 2014-01-02 15:20:17 +0800 |
commit | 818a046e369d3e53c76f9f957d0ddb33dd95aa10 (patch) | |
tree | 1f68e017c0c7e5c0f98c9e18bdbc7c4263b72c52 /ceilometer/nova_client.py | |
parent | dfed6ac2a38461458a3161635c1886fe68bf3154 (diff) | |
download | ceilometer-818a046e369d3e53c76f9f957d0ddb33dd95aa10.tar.gz |
Remove redundant code in nova_client.Client
'a and a or b' is equal to 'a or b', the redundant code can be
removed.
This patch also fixes the docstring of __init__, which actually
initializes a nova client object, not returns.
Change-Id: I0815928a2b597452048a1cc6c2170259a53ccaf9
Closes-Bug: #1264099
Diffstat (limited to 'ceilometer/nova_client.py')
-rw-r--r-- | ceilometer/nova_client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ceilometer/nova_client.py b/ceilometer/nova_client.py index f927592d..9d5193e8 100644 --- a/ceilometer/nova_client.py +++ b/ceilometer/nova_client.py @@ -41,11 +41,12 @@ def logged(func): class Client(object): + """A client which gets information via python-novaclient.""" def __init__(self): - """Returns a nova Client object.""" + """Initialize a nova client object.""" conf = cfg.CONF.service_credentials - tenant = conf.os_tenant_id and conf.os_tenant_id or conf.os_tenant_name + tenant = conf.os_tenant_id or conf.os_tenant_name self.nova_client = nova_client.Client( username=conf.os_username, api_key=conf.os_password, |