rhn_channel: fix py3 compatibility (use six)
and remove unused import
This commit is contained in:
parent
5f62a973da
commit
f761fc1d1f
2 changed files with 4 additions and 9 deletions
|
@ -64,9 +64,8 @@ EXAMPLES = '''
|
|||
password: guessme
|
||||
'''
|
||||
|
||||
import xmlrpclib
|
||||
from operator import itemgetter
|
||||
import re
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six.moves import xmlrpc_client
|
||||
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
|
@ -137,8 +136,8 @@ def main():
|
|||
user = module.params['user']
|
||||
password = module.params['password']
|
||||
|
||||
#initialize connection
|
||||
client = xmlrpclib.Server(saturl, verbose=0)
|
||||
# initialize connection
|
||||
client = xmlrpc_client(saturl)
|
||||
session = client.auth.login(user, password)
|
||||
|
||||
# get systemid
|
||||
|
@ -165,8 +164,5 @@ def main():
|
|||
client.auth.logout(session)
|
||||
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -97,7 +97,6 @@ lib/ansible/modules/network/lenovo/cnos_vlag.py
|
|||
lib/ansible/modules/network/lenovo/cnos_vlan.py
|
||||
lib/ansible/modules/network/nxos/nxos_file_copy.py
|
||||
lib/ansible/modules/packaging/language/maven_artifact.py
|
||||
lib/ansible/modules/packaging/os/rhn_channel.py
|
||||
lib/ansible/modules/storage/infinidat/infini_export.py
|
||||
lib/ansible/modules/storage/infinidat/infini_export_client.py
|
||||
lib/ansible/modules/storage/infinidat/infini_fs.py
|
||||
|
|
Loading…
Reference in a new issue