diff options
Diffstat (limited to 'test/lib/ansible_test/_internal/cloud/azure.py')
-rw-r--r-- | test/lib/ansible_test/_internal/cloud/azure.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/lib/ansible_test/_internal/cloud/azure.py b/test/lib/ansible_test/_internal/cloud/azure.py index 9128237a9b..277fce76c1 100644 --- a/test/lib/ansible_test/_internal/cloud/azure.py +++ b/test/lib/ansible_test/_internal/cloud/azure.py @@ -4,6 +4,10 @@ __metaclass__ = type import os +from ..io import ( + read_text_file, +) + from ..util import ( ApplicationError, display, @@ -86,8 +90,7 @@ class AzureCloudProvider(CloudProvider): response = {} if os.path.isfile(self.SHERLOCK_CONFIG_PATH): - with open(self.SHERLOCK_CONFIG_PATH, 'r') as sherlock_fd: - sherlock_uri = sherlock_fd.readline().strip() + '&rgcount=2' + sherlock_uri = read_text_file(self.SHERLOCK_CONFIG_PATH).splitlines()[0].strip() + '&rgcount=2' parts = urlparse(sherlock_uri) query_string = parse_qs(parts.query) |