mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Use an exception to ask confirmation
This commit is contained in:
parent
bd610e4057
commit
eff7367fb3
1 changed files with 2 additions and 13 deletions
|
|
@ -34,16 +34,5 @@ def pytest_configure(config):
|
|||
:param config: the current pytest configuration
|
||||
"""
|
||||
if not config.option.confirm:
|
||||
capture_manager = config.pluginmanager.getplugin('capturemanager')
|
||||
try:
|
||||
capture_manager.suspendcapture(in_=True)
|
||||
|
||||
print('++ WARNING ++')
|
||||
print('-------------')
|
||||
print('This integration test will install Certbot on your machine.')
|
||||
print('At the end of the test you will need to manually uninstall it.')
|
||||
print('-------------')
|
||||
|
||||
input('Please press ENTER to continue, or CTRL+C to cancel.')
|
||||
finally:
|
||||
capture_manager.resumecapture()
|
||||
raise RuntimeError('This integration test would install Certbot on your machine. '
|
||||
'Please run it again with the `--confirm` flag set to acknowledge.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue