mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
be explicit about urllib import and remove conditional urllib(2) import
urllib and urllib2 have been in the python stdlib since at least python-2.3. There's no reason to conditionalize it. Fixes https://github.com/ansible/ansible/issues/11322
This commit is contained in:
parent
655fa27dc7
commit
16bd2c7357
11 changed files with 23 additions and 20 deletions
|
@ -81,7 +81,7 @@ options:
|
|||
default: 'yes'
|
||||
choices: ['yes', 'no']
|
||||
|
||||
requirements: [ "urllib", "urllib2" ]
|
||||
requirements: []
|
||||
author: "Nandor Sivok (@dominis)"
|
||||
'''
|
||||
|
||||
|
@ -99,7 +99,7 @@ ansible host -m netscaler -a "nsc_host=nsc.example.com user=apiuser password=api
|
|||
|
||||
import base64
|
||||
import socket
|
||||
|
||||
import urllib
|
||||
|
||||
class netscaler(object):
|
||||
|
||||
|
|
|
@ -86,8 +86,8 @@ notes:
|
|||
- The DNS Made Easy service requires that machines interacting with the API have the proper time and timezone set. Be sure you are within a few seconds of actual time by using NTP.
|
||||
- This module returns record(s) in the "result" element when 'state' is set to 'present'. This value can be be registered and used in your playbooks.
|
||||
|
||||
requirements: [ urllib, urllib2, hashlib, hmac ]
|
||||
author: Brice Burgess
|
||||
requirements: [ hashlib, hmac ]
|
||||
author: "Brice Burgess (@briceburg)"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -113,6 +113,8 @@ EXAMPLES = '''
|
|||
# DNSMadeEasy module specific support methods.
|
||||
#
|
||||
|
||||
import urllib
|
||||
|
||||
IMPORT_ERROR = None
|
||||
try:
|
||||
import json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue