Skip to content

Commit

Permalink
ros#610: encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrrx authored and jspricke committed Jan 31, 2017
1 parent a80d254 commit b077ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/rosgraph/src/rosgraph/transport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""A replacement transport for Python xmlrpc library."""

try:
Expand Down Expand Up @@ -27,7 +26,8 @@ def request(self, host, handler, request_body, verbose=0):
host=host,
handler=handler)
try:
resp = requests.post(url, data=request_body, headers=headers)
resp = requests.post(url, data=request_body.encode('utf-8'),
headers=headers)
except requests.exceptions.Timeout:
raise socket.timeout('timed out')
except requests.RequestException as exc:
Expand Down

0 comments on commit b077ed1

Please sign in to comment.