From 990dbaaef8cc8f67057c3c7de047a2ad1e164cc2 Mon Sep 17 00:00:00 2001 From: yfyyfy <32302435+yfyyfy@users.noreply.github.com> Date: Tue, 8 Oct 2019 23:23:18 +0900 Subject: [PATCH] Fix assert statement for checking content type --- landez/sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/landez/sources.py b/landez/sources.py index 307691a..b9995cb 100644 --- a/landez/sources.py +++ b/landez/sources.py @@ -229,7 +229,7 @@ def tile(self, z, x, y): try: logger.debug(_("Download '%s'") % url) request = requests.get(url, headers=self.headers) - assert request.headers == self.wmsParams['format'], "Invalid WMS response type : %s" % self.headers + assert request.headers['Content-Type'] == self.wmsParams['format'], "Invalid WMS response type : %s" % request.headers['Content-Type'] return request.content except (AssertionError, IOError): raise ExtractionError