mirror of https://github.com/ansible/ansible.git
Import from urllib and not url (#25102)
* Import from urllib and not url In Python 3, the correct way to import urlparse is through urllib.parse. * Use six module to import urlparse Import urlparse from ansible.module_utils.six. This way, the import statement is compatible both with Python 3 and Python 2. * Fix urlparse import using six module The correct import is: from six.moves.urllib.parse import urlparse * Import six from ansible.compat * Import from six.moves. Don't make six global. Prevent code smell by not making six available in the global namespace and instead importing from one of its subpackages.pull/25208/head
parent
e67cdd448e
commit
b7662f7e5b
Loading…
Reference in New Issue