1. PyPA
  2. Python Packaging Authority Projects
  3. pypi

Commits

Donald Stufft  committed a01cf3f

Raise an exception for a bad status

  • Participants
  • Parent commits dbe2a2c
  • Branches default

Comments (0)

Files changed (1)

File store.py

View file
  • Ignore whitespace
                 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()