diff --git a/salt/utils/vmware.py b/salt/utils/vmware.py index 96575bfc65..cbc48c1d58 100644 --- a/salt/utils/vmware.py +++ b/salt/utils/vmware.py @@ -77,6 +77,7 @@ from __future__ import absolute_import import atexit import logging import time +from httplib import BadStatusLine # Import Salt Libs from salt.exceptions import SaltSystemExit @@ -440,7 +441,15 @@ def get_mors_with_properties(service_instance, object_type, property_list=None, rootFolder. ''' # Get all the content - content = get_content(service_instance, object_type, property_list=property_list, container_ref=container_ref) + content_args = [service_instance, object_type] + content_kwargs = {'property_list': property_list, + 'container_ref': container_ref, + 'traversal_spec': traversal_spec, + 'local_properties': local_properties} + try: + content = get_content(*content_args, **content_kwargs) + except BadStatusLine: + content = get_content(*content_args, **content_kwargs) object_list = [] for obj in content: