diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 252be82c28f..45c7ae271f2 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -188,8 +188,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):