summaryrefslogtreecommitdiff
path: root/azurelinuxagent/common/protocol/restapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'azurelinuxagent/common/protocol/restapi.py')
-rw-r--r--azurelinuxagent/common/protocol/restapi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/azurelinuxagent/common/protocol/restapi.py b/azurelinuxagent/common/protocol/restapi.py
index a42db37..1ec3e21 100644
--- a/azurelinuxagent/common/protocol/restapi.py
+++ b/azurelinuxagent/common/protocol/restapi.py
@@ -317,8 +317,8 @@ class Protocol(DataContract):
def download_ext_handler_pkg(self, uri, headers=None):
try:
- resp = restutil.http_get(uri, chk_proxy=True, headers=headers)
- if resp.status == restutil.httpclient.OK:
+ resp = restutil.http_get(uri, use_proxy=True, headers=headers)
+ if restutil.request_succeeded(resp):
return resp.read()
except Exception as e:
logger.warn("Failed to download from: {0}".format(uri), e)