Skip to content

Commit

Permalink
Encode resulting messages in UTF-8 before printing them
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaeon committed Jan 28, 2015
1 parent 9e32e9e commit 362444c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vpoller-client
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Examples:

data = client.run(msg)

print('{}'.format(data))
print(data.encode('utf-8'))

if __name__ == '__main__':
main()
4 changes: 2 additions & 2 deletions src/vpoller-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def stop(endpoint):
client = VPollerClient(endpoint=endpoint, timeout=1000, retries=3)
result = client.run({'method': 'shutdown'})

print('{}'.format(result))
print(result.encode('utf-8'))

def status(endpoint):
"""
Expand All @@ -75,7 +75,7 @@ def status(endpoint):
client = VPollerClient(endpoint=endpoint, timeout=1000, retries=3)
result = client.run({'method': 'status'})

print('{}'.format(result))
print(result.encode('utf-8'))

def main():

Expand Down
4 changes: 2 additions & 2 deletions src/vpoller-worker
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def stop(endpoint):
client = VPollerClient(endpoint=endpoint, timeout=1000, retries=3)
result = client.run({'method': 'shutdown'})

print('{}'.format(result))
print(result.encode('utf-8'))

def status(endpoint):
"""
Expand All @@ -85,7 +85,7 @@ def status(endpoint):
client = VPollerClient(endpoint=endpoint, timeout=1000, retries=3)
result = client.run({'method': 'status'})

print('{}'.format(result))
print(result.encode('utf-8'))

def main():
usage="""
Expand Down

0 comments on commit 362444c

Please sign in to comment.