Skip to content

Commit

Permalink
Fix error when running in python3
Browse files Browse the repository at this point in the history
 - 'str' object has no attribute 'decode', it should be encoded previously
 - and 'string-escape' now is 'unicode_escape'
  • Loading branch information
Palollo authored Jul 1, 2024
1 parent 2f45a05 commit bee1c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ec3
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def dump_list(l, order, width=80, indent=4):
s = s[(b+1 if b >= 0 else width0-1):]
indented = True; width0 = width - indent
return "\n\n".join([ "\n".join([ s for k in order for s in break_line("%s: %s" % (k, d[k].expandtabs()
.decode("string_escape"))) ]) for d in l ])
.encode('latin1').decode("unicode_escape"))) ]) for d in l ])

def getPublicIP(s):
for i in range(4):
Expand Down

0 comments on commit bee1c20

Please sign in to comment.