mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 10:43:14 +00:00
Addresses #5090 setup module was using path.is_file instead of path.isfile
This commit is contained in:
@@ -122,7 +122,7 @@ def get_distribution():
|
||||
if platform.system() == 'Linux':
|
||||
try:
|
||||
distribution = platform.linux_distribution()[0].capitalize()
|
||||
if not distribution and os.path.is_file('/etc/system-release'):
|
||||
if not distribution and os.path.isfile('/etc/system-release'):
|
||||
distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize()
|
||||
if 'Amazon' in distribution:
|
||||
distribution = 'Amazon'
|
||||
|
||||
Reference in New Issue
Block a user