mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Fixed import of urlencode and pathname2url from urllib for python3 (#24424)
This commit is contained in:
@@ -119,13 +119,8 @@ output:
|
||||
import json
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlencode
|
||||
from ansible.module_utils.urls import fetch_url
|
||||
try:
|
||||
# python2
|
||||
from urllib import urlencode
|
||||
except ImportError:
|
||||
# python3
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
||||
def is_csrf_protection_enabled(module):
|
||||
|
||||
Reference in New Issue
Block a user