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:
Toshio Kuratomi
2015-06-19 08:59:19 -07:00
committed by Matt Clay
parent 655fa27dc7
commit 16bd2c7357
11 changed files with 23 additions and 20 deletions

View File

@@ -62,8 +62,7 @@ options:
version_added: 1.6.0
# informational: requirements for nodes
requirements: [ urllib, urllib2 ]
requirements: [ ]
author: "WAKAYAMA Shirou (@shirou), BOURDEL Paul (@pb8226)"
'''
@@ -76,6 +75,7 @@ EXAMPLES = '''
#
MSG_URI = "https://api.hipchat.com/v1/rooms/message"
import urllib
def send_msg(module, token, room, msg_from, msg, msg_format='text',
color='yellow', notify=False, api=MSG_URI):