File: 0002-handle-missing-content-type.patch

package info (click to toggle)
python-logi-circle 0.2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: python: 1,686; xml: 16; sh: 5; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 686 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Edward Betts <edward@4angle.com>
Date: Thu, 25 Dec 2025 15:42:00 +0000
Subject: handle missing content-type

---
 logi_circle/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/logi_circle/__init__.py b/logi_circle/__init__.py
index c924327..85d50bb 100644
--- a/logi_circle/__init__.py
+++ b/logi_circle/__init__.py
@@ -214,7 +214,7 @@ class LogiCircle():
         if raw:
             # Return unread ClientResponse object to client.
             return resp
-        if 'json' in content_type:
+        if content_type and 'json' in content_type:
             resp_data = await resp.json()
         else:
             resp_data = await resp.read()