2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Handle more errors

subprocess may throw other errors that aren't calledprocesserrors,
in newer python versions.  Handle the case more broadly.
This commit is contained in:
Jarrod Johnson 2023-01-17 10:04:10 -05:00
parent 0929f059e2
commit d1265af828

View File

@ -285,7 +285,7 @@ def initialize(cmdset):
try:
subprocess.check_call(['systemctl', 'try-restart', 'httpd'])
print('HTTP server has been restarted if it was running')
except subprocess.CalledProcessError:
except Exception:
emprint('New HTTPS certificates generated, restart the web server manually')
elif os.path.exists('/usr/lib/systemd/system/apache2.service'):
try: