From b414d920249c0abdd8957061de9b5dfc2a0d087f Mon Sep 17 00:00:00 2001 From: Russell Harrison Date: Fri, 29 Jan 2016 17:00:46 -0500 Subject: Remove commented lines and fix pylint check --- roles/lib_dyn/library/dyn_record.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'roles/lib_dyn/library') 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)) -- cgit v1.2.3