Catch RuntimeError on unpatching in case of multiple unpatching.
This commit is contained in:
parent
774de0d54d
commit
2ee484990d
1 changed files with 9 additions and 2 deletions
|
|
@ -206,8 +206,15 @@ class ResponsesMockAWS(BaseMockAWS):
|
|||
)
|
||||
|
||||
def disable_patching(self):
|
||||
botocore_mock.stop()
|
||||
responses.stop()
|
||||
try:
|
||||
botocore_mock.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
responses.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
|
||||
MockAWS = ResponsesMockAWS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue