diff options
author | Donald Stufft <donald@stufft.io> | 2013-05-27 13:42:35 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-05-27 13:42:35 -0400 |
commit | 960d2098806c857f5551aa4ffe97b1bd2220cc80 (patch) | |
tree | 51a8ef64593e7a827625873c10e3a41d45097f12 /store.py | |
parent | 9cc24696c2fb8fde6570188e45e205785a14af03 (diff) | |
download | decorator-960d2098806c857f5551aa4ffe97b1bd2220cc80.tar.gz |
Raise an exception for a bad status
Diffstat (limited to 'store.py')
-rw-r--r-- | store.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2318,12 +2318,13 @@ class Store: normalized_name = normalize_package_name(package) path = "/service/%(id)s/purge/pkg~%(name)s" % {"id": None, "name": normalized_name} url = urlparse.urljoin(self.config.fastly_api_domain, path) - session.post(url, + resp = session.post(url, headers={ "X-Fastly-Key": self.config.fastly_api_key, "Accept": "application/json", }, ) + resp.raise_for_status() self._changed_packages = set() |