summaryrefslogtreecommitdiff
path: root/swift/common/manager.py
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2019-08-05 14:51:14 -0700
committerTim Burke <tim.burke@gmail.com>2019-09-26 22:04:38 -0700
commitad7f7da32d6f90aa49873f1021d18cd54daef102 (patch)
tree728c8087a70495e5c68a2086e86f2ef4877f04c3 /swift/common/manager.py
parent489a35db825f58a204471ea9da9b9c61ca6cfa4c (diff)
downloadswift-ad7f7da32d6f90aa49873f1021d18cd54daef102.tar.gz
py3: decode stdout from backgrounded servers
Otherwise, when we go to print() it, we get a bunch of b"" strings. Change-Id: If62da0b4b34b9d1396b5838bf79ff494679f1ae3
Diffstat (limited to 'swift/common/manager.py')
-rw-r--r--swift/common/manager.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/swift/common/manager.py b/swift/common/manager.py
index 978e2fbb6..47f47d03b 100644
--- a/swift/common/manager.py
+++ b/swift/common/manager.py
@@ -22,6 +22,7 @@ import signal
import time
import subprocess
import re
+import six
from swift import gettext_ as _
import tempfile
@@ -720,6 +721,8 @@ class Server(object):
else:
output = proc.stdout.read()
proc.stdout.close()
+ if not six.PY2:
+ output = output.decode('utf8', 'backslashreplace')
if kwargs.get('once', False):
# if you don't want once to wait you can send it to the