diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 35f63ab5e82..7e71231a325 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -190,8 +190,11 @@ def get_distribution_version(): except: # FIXME: MethodMissing, I assume? distribution_version = platform.dist()[1] + if type(distribution_version) == str: + distribution_version = 0 else: - distribution_version = None + distribution_version = 0 + return distribution_version def load_platform_subclass(cls, *args, **kwargs):