11# For sphinx:
22from functools import wraps
33
4- from sumo .wrapper ._auth_provider import AuthProviderSumoToken
5-
64
75def raise_for_status (func ):
86 @wraps (func )
@@ -11,9 +9,7 @@ def wrapper(self, *args, **kwargs):
119 # so we could simply write
1210 # return func(*args, **kwargs).raise_for_status()
1311 response = func (self , * args , ** kwargs )
14- if response .status_code == 401 and isinstance (
15- self .auth , AuthProviderSumoToken
16- ):
12+ if response .status_code == 401 :
1713 self ._handle_invalid_shared_key ()
1814 response .raise_for_status ()
1915 return response
@@ -28,9 +24,7 @@ async def wrapper(self, *args, **kwargs):
2824 # so we could simply write
2925 # return func(*args, **kwargs).raise_for_status()
3026 response = await func (self , * args , ** kwargs )
31- if response .status_code == 401 and isinstance (
32- self .auth , AuthProviderSumoToken
33- ):
27+ if response .status_code == 401 :
3428 self ._handle_invalid_shared_key ()
3529 response .raise_for_status ()
3630 return response
0 commit comments