Do not encode the type (b) in the job name

Don't encode string type in the job name in handleRequest(). Without
the explicit .decode() before passing to the string formatter it
would end up looking like b"b'<jobname'\t\n...." which made for
working with gear on the other side near impossible because a
decode of the job data would not result in a consumable string
matching expected values.

Now there is an explicit decode prior to formatting the string
data.

Change-Id: Ib2996b84bce719a2f91c166aaa4278c18f89f88f
This commit is contained in:
Morgan Fainberg 2016-06-08 13:03:57 -07:00
parent f7a82065b8
commit 59d29104cb
1 changed files with 1 additions and 1 deletions

View File

@ -2937,7 +2937,7 @@ class Server(BaseClientServer):
functions = self._getFunctionStats()
for name, values in functions.items():
request.connection.sendRaw(("%s\t%s\t%s\t%s\n" %
(name, values[0], values[1],
(name.decode('utf-8'), values[0], values[1],
values[2])).encode('utf8'))
request.connection.sendRaw(b'.\n')