Skip to content

Commit fb58aca

Browse files
authored
fix: use utf-8 encoding in check_output
fix the output from byte literal to utf-8 decoded string
1 parent 6172dc8 commit fb58aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo_clock_and_IP.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from datetime import datetime
66
from subprocess import check_output
77
display = drivers.Lcd()
8-
IP = check_output(["hostname", "-I"]).split()[0].decode('ascii')
8+
IP = check_output(["hostname", "-I"], encoding="utf8").split()[0]
99
try:
1010
print("Writing to display")
1111
while True:

0 commit comments

Comments
 (0)