From bee1c2046de4d4f1112c7f3726641912021d8c7d Mon Sep 17 00:00:00 2001 From: Palollo Date: Mon, 1 Jul 2024 21:03:43 +0200 Subject: [PATCH] Fix error when running in python3 - 'str' object has no attribute 'decode', it should be encoded previously - and 'string-escape' now is 'unicode_escape' --- ec3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ec3 b/ec3 index eba7415..ac1969d 100755 --- a/ec3 +++ b/ec3 @@ -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):