Catch RuntimeError on unpatching in case of multiple unpatching.
This commit is contained in:
parent
774de0d54d
commit
2ee484990d
@ -206,8 +206,15 @@ class ResponsesMockAWS(BaseMockAWS):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def disable_patching(self):
|
def disable_patching(self):
|
||||||
|
try:
|
||||||
botocore_mock.stop()
|
botocore_mock.stop()
|
||||||
|
except RuntimeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
responses.stop()
|
responses.stop()
|
||||||
|
except RuntimeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
MockAWS = ResponsesMockAWS
|
MockAWS = ResponsesMockAWS
|
||||||
|
Loading…
Reference in New Issue
Block a user