mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:14:54 +02:00
+3
-1
@@ -126,11 +126,13 @@ def execute(shell_cmd):
|
|||||||
cmd = Popen(shell_cmd, shell=True, stdout=PIPE,
|
cmd = Popen(shell_cmd, shell=True, stdout=PIPE,
|
||||||
stderr=PIPE, universal_newlines=True)
|
stderr=PIPE, universal_newlines=True)
|
||||||
out, err = cmd.communicate()
|
out, err = cmd.communicate()
|
||||||
|
base_cmd = os.path.basename(shell_cmd.split(None, 1)[0])
|
||||||
|
if out:
|
||||||
|
logger.info('Output from %s:\n%s', base_cmd, out)
|
||||||
if cmd.returncode != 0:
|
if cmd.returncode != 0:
|
||||||
logger.error('Hook command "%s" returned error code %d',
|
logger.error('Hook command "%s" returned error code %d',
|
||||||
shell_cmd, cmd.returncode)
|
shell_cmd, cmd.returncode)
|
||||||
if err:
|
if err:
|
||||||
base_cmd = os.path.basename(shell_cmd.split(None, 1)[0])
|
|
||||||
logger.error('Error output from %s:\n%s', base_cmd, err)
|
logger.error('Error output from %s:\n%s', base_cmd, err)
|
||||||
return (err, out)
|
return (err, out)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user