Skip to content

Commit

Permalink
python3: decode to utf8
Browse files Browse the repository at this point in the history
Part of #20

Co-authored-by: Alexander Turenko <[email protected]>
  • Loading branch information
ligurio and Totktonada committed Nov 21, 2020
1 parent 24cd430 commit cdc7d73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/inspector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import yaml
import traceback

Expand Down Expand Up @@ -74,6 +75,8 @@ def readline(socket, delimiter='\n', size=4096):
while data:
try:
data = socket.recv(size)
if sys.version_info[0] == 3:
data = data.decode('utf-8')
except IOError:
# catch instance halt connection refused errors
data = ''
Expand Down

0 comments on commit cdc7d73

Please sign in to comment.