Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/common/cache/facts_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _get_default_zone(function, func_args, func_kargs):
unicode_type = str if sys.version_info.major >= 3 else unicode # noqa: F821
if func_args:
hostname = getattr(func_args[0], "hostname", None)
if not hostname or type(hostname) not in [str, unicode_type]:
if not hostname or not isinstance(hostname, (str, unicode_type)):
raise ValueError("Failed to get attribute 'hostname' of type string from instance of type %s."
% type(func_args[0]))
zone = hostname
Expand Down