Skip to content

Commit fd935c9

Browse files
committed
Revert to code that works with httpx version 0.24.1
1 parent ff8d3a2 commit fd935c9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/sumo/wrapper/decorators.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
def raise_for_status(func):
66
def wrapper(*args, **kwargs):
7-
return func(*args, **kwargs).raise_for_status()
7+
# FIXME: in newer versions of httpx, raise_for_status() is chainable,
8+
# so we could simply write
9+
# return func(*args, **kwargs).raise_for_status()
10+
response = func(*args, **kwargs)
11+
response.raise_for_status()
12+
return response
813

914
return wrapper
1015

0 commit comments

Comments
 (0)