summaryrefslogtreecommitdiff
path: root/gear/__init__.py
diff options
context:
space:
mode:
authorMorgan Fainberg <morgan.fainberg@gmail.com>2016-06-08 13:03:57 -0700
committerMorgan Fainberg <morgan.fainberg@gmail.com>2016-06-08 13:06:09 -0700
commit59d29104cb9c370e49b44f313e568bd43b172e1b (patch)
treea01b2b88867152de5592ec94fa2b1e99adf34b66 /gear/__init__.py
parentf7a82065b81a11c21d5ca59f0079dcfcb633bc07 (diff)
downloadgear-59d29104cb9c370e49b44f313e568bd43b172e1b.tar.gz
Do not encode the type (b) in the job name0.6.2
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
Diffstat (limited to 'gear/__init__.py')
-rw-r--r--gear/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gear/__init__.py b/gear/__init__.py
index c561a86..f775d83 100644
--- a/gear/__init__.py
+++ b/gear/__init__.py
@@ -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')