diff options
author | Russell Harrison <rharriso@redhat.com> | 2016-01-29 17:00:46 -0500 |
---|---|---|
committer | Russell Harrison <rharriso@redhat.com> | 2016-01-29 17:00:46 -0500 |
commit | b414d920249c0abdd8957061de9b5dfc2a0d087f (patch) | |
tree | d3ea356fca983343b3951297c03d62c181ecb288 /roles/lib_dyn/library | |
parent | a871f7f96245cfcfeeb8a82b4137e76ff78b36c5 (diff) | |
download | openshift-b414d920249c0abdd8957061de9b5dfc2a0d087f.tar.gz openshift-b414d920249c0abdd8957061de9b5dfc2a0d087f.tar.bz2 openshift-b414d920249c0abdd8957061de9b5dfc2a0d087f.tar.xz openshift-b414d920249c0abdd8957061de9b5dfc2a0d087f.zip |
Remove commented lines and fix pylint check
Diffstat (limited to 'roles/lib_dyn/library')
-rw-r--r-- | roles/lib_dyn/library/dyn_record.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/roles/lib_dyn/library/dyn_record.py b/roles/lib_dyn/library/dyn_record.py index da9909ee2..5e088a674 100644 --- a/roles/lib_dyn/library/dyn_record.py +++ b/roles/lib_dyn/library/dyn_record.py @@ -96,14 +96,12 @@ author: "Russell Harrison" ''' try: + IMPORT_ERROR = False from dyn.tm.session import DynectSession -# from dyn.tm.zones import get_all_zones from dyn.tm.zones import Zone import dyn.tm.errors -# import json import os -# import sys - IMPORT_ERROR = False + except ImportError as error: IMPORT_ERROR = str(error) @@ -182,12 +180,9 @@ def main(): # Start the Dyn session try: - # dyn_session is needed to access the other objects but rarely gets - # used on its own. - #pylint: disable=unused-variable - dyn_session = DynectSession(module.params['customer_name'], - module.params['user_name'], - module.params['user_password']) + _ = DynectSession(module.params['customer_name'], + module.params['user_name'], + module.params['user_password']) except dyn.tm.errors.DynectAuthError as error: module.fail_json(msg='Unable to authenticate with Dyn', error=str(error)) |