Skip to content

Commit

Permalink
Fix key error while delete not return content-type
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <xuanwo@yunify.com>
  • Loading branch information
Xuanwo committed Jul 9, 2018
1 parent e33c271 commit 2cbfe96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qingstor/sdk/unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def unpack_response_body(self):
# In other situations, body should not be unpacked for possibly large memory usage
if not (
self.res.ok and
self.res.headers["Content-Type"] != "application/json"
self.res.headers.get("Content-Type") != "application/json"
):
try:
data = self.res.json()
Expand Down

0 comments on commit 2cbfe96

Please sign in to comment.