From 42a59372889eec826901c9c184f907f7be55eb74 Mon Sep 17 00:00:00 2001 From: Keoni Mahelona Date: Wed, 4 Mar 2020 18:03:01 +1300 Subject: [PATCH] Updated other old tn.write() functions --- python_apps/pypo/pypo/pypofetch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python_apps/pypo/pypo/pypofetch.py b/python_apps/pypo/pypo/pypofetch.py index 3e7c4638c..2ee91d1b1 100644 --- a/python_apps/pypo/pypo/pypofetch.py +++ b/python_apps/pypo/pypo/pypofetch.py @@ -229,7 +229,7 @@ class PypoFetch(Thread): self.logger.info(connection_status) tn.write(connection_status) - tn.write('exit\n') + tn.write('exit\n'.encode('ascii')) output = tn.read_all() except Exception as e: @@ -281,7 +281,7 @@ class PypoFetch(Thread): command = ('vars.default_dj_fade %s\n' % fade).encode('utf-8') self.logger.info(command) tn.write(command) - tn.write('exit\n') + tn.write('exit\n'.encode('ascii')) tn.read_all() except Exception as e: self.logger.exception(e) @@ -299,7 +299,7 @@ class PypoFetch(Thread): command = ('vars.station_name %s\n' % station_name).encode('utf-8') self.logger.info(command) tn.write(command) - tn.write('exit\n') + tn.write('exit\n'.encode('ascii')) tn.read_all() except Exception as e: self.logger.exception(e)