Return str from hooks.execute, not bytes

This commit is contained in:
Brad Warren
2016-12-08 12:22:15 -08:00
parent 2cb558ff18
commit 550ba19b32
+2 -1
View File
@@ -84,7 +84,8 @@ def execute(shell_cmd):
:returns: `tuple` (`str` stderr, `str` stdout)""" :returns: `tuple` (`str` stderr, `str` stdout)"""
cmd = Popen(shell_cmd, shell=True, stdout=PIPE, stderr=PIPE) cmd = Popen(shell_cmd, shell=True, stdout=PIPE,
stderr=PIPE, universal_newlines=True)
out, err = cmd.communicate() out, err = cmd.communicate()
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',