Remove .encode(). Not needed in python3

This commit is contained in:
Keoni Mahelona 2020-03-04 18:13:42 +13:00 committed by Kyle Robbertze
parent 42a5937288
commit dd46b4c984
1 changed files with 10 additions and 10 deletions

View File

@ -159,9 +159,9 @@ class PypoFetch(Thread):
station_name = info['station_name']
fade = info['transition_fade']
commands.append(('vars.stream_metadata_type %s\n' % stream_format).encode('utf-8'))
commands.append(('vars.station_name %s\n' % station_name).encode('utf-8'))
commands.append(('vars.default_dj_fade %s\n' % fade).encode('utf-8'))
commands.append(('vars.stream_metadata_type %s\n' % stream_format))
commands.append(('vars.station_name %s\n' % station_name))
commands.append(('vars.default_dj_fade %s\n' % fade))
self.pypo_liquidsoap.get_telnet_dispatcher().telnet_send(commands)
self.pypo_liquidsoap.clear_all_queues()
@ -229,7 +229,7 @@ class PypoFetch(Thread):
self.logger.info(connection_status)
tn.write(connection_status)
tn.write('exit\n'.encode('ascii'))
tn.write('exit\n')
output = tn.read_all()
except Exception as e:
@ -261,10 +261,10 @@ class PypoFetch(Thread):
try:
self.telnet_lock.acquire()
tn = telnetlib.Telnet(self.config['ls_host'], self.config['ls_port'])
command = ('vars.stream_metadata_type %s\n' % stream_format).encode('utf-8')
command = ('vars.stream_metadata_type %s\n' % stream_format)
self.logger.info(command)
tn.write(command)
tn.write('exit\n'.encode('ascii'))
tn.write('exit\n')
tn.read_all()
except Exception as e:
self.logger.exception(e)
@ -278,10 +278,10 @@ class PypoFetch(Thread):
try:
self.telnet_lock.acquire()
tn = telnetlib.Telnet(self.config['ls_host'], self.config['ls_port'])
command = ('vars.default_dj_fade %s\n' % fade).encode('utf-8')
command = ('vars.default_dj_fade %s\n' % fade)
self.logger.info(command)
tn.write(command)
tn.write('exit\n'.encode('ascii'))
tn.write('exit\n')
tn.read_all()
except Exception as e:
self.logger.exception(e)
@ -296,10 +296,10 @@ class PypoFetch(Thread):
try:
self.telnet_lock.acquire()
tn = telnetlib.Telnet(self.config['ls_host'], self.config['ls_port'])
command = ('vars.station_name %s\n' % station_name).encode('utf-8')
command = ('vars.station_name %s\n' % station_name)
self.logger.info(command)
tn.write(command)
tn.write('exit\n'.encode('ascii'))
tn.write('exit\n')
tn.read_all()
except Exception as e:
self.logger.exception(e)