mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
This commit is contained in:
@@ -46,7 +46,6 @@ EXAMPLES = '''
|
||||
# }
|
||||
'''
|
||||
|
||||
import platform
|
||||
|
||||
HAVE_XENAPI = False
|
||||
try:
|
||||
@@ -55,6 +54,7 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.module_utils import distro
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ class XenServerFacts:
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
# Be aware! Deprecated in Python 2.6!
|
||||
result = platform.dist()[1]
|
||||
result = distro.linux_distribution()[1]
|
||||
return result
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user