summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/lib_dyn/library/dyn_record.py15
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))