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):
|
||||
botocore_mock.stop()
|
||||
responses.stop()
|
||||
try:
|
||||
botocore_mock.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
responses.stop()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
|
||||
MockAWS = ResponsesMockAWS
|
||||
|
Loading…
Reference in New Issue
Block a user