diff options
author | Ćukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> | 2017-09-04 10:27:07 +0200 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2017-09-04 09:38:24 +0000 |
commit | e919bdd14e48919244da9e499070fb64377993e5 (patch) | |
tree | 33c260c7c99410ac94d5f265fc506cc0b40bb6e4 /azurelinuxagent/common/protocol/metadata.py | |
parent | 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b (diff) | |
parent | 3a1d96a77ccaf023256d16183428e3d895f8a051 (diff) | |
download | vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.tar.gz vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.zip |
Import patches-applied version 2.2.16-0ubuntu1 to applied/ubuntu/artful-proposed
Imported using git-ubuntu import.
Changelog parent: 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b
Unapplied parent: 3a1d96a77ccaf023256d16183428e3d895f8a051
New changelog entries:
* New upstream release (LP: #1714299).
Diffstat (limited to 'azurelinuxagent/common/protocol/metadata.py')
-rw-r--r-- | azurelinuxagent/common/protocol/metadata.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azurelinuxagent/common/protocol/metadata.py b/azurelinuxagent/common/protocol/metadata.py index b0b6f67..4de7ecf 100644 --- a/azurelinuxagent/common/protocol/metadata.py +++ b/azurelinuxagent/common/protocol/metadata.py @@ -88,7 +88,7 @@ class MetadataProtocol(Protocol): except HttpError as e: raise ProtocolError(ustr(e)) - if resp.status != httpclient.OK: + if restutil.request_failed(resp): raise ProtocolError("{0} - GET: {1}".format(resp.status, url)) data = resp.read() @@ -103,7 +103,7 @@ class MetadataProtocol(Protocol): resp = restutil.http_put(url, json.dumps(data), headers=headers) except HttpError as e: raise ProtocolError(ustr(e)) - if resp.status != httpclient.OK: + if restutil.request_failed(resp): raise ProtocolError("{0} - PUT: {1}".format(resp.status, url)) def _post_data(self, url, data, headers=None): |