Try the connection again, in case it's been reset

This commit is contained in:
Joseph Hall 2016-11-10 12:00:08 -07:00 committed by rallytime
parent 4c07b3534a
commit 69893f0c38

View File

@ -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: