Skip to content

Commit

Permalink
Convert CWOP responses to strings
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed Aug 29, 2018
1 parent b8d4f8e commit 4a3f6e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '18.8.0'
_release = '1610'
_commit = '0dfa5e2'
_release = '1611'
_commit = 'b8d4f8e'
4 changes: 2 additions & 2 deletions src/pywws/service/cwop.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def session(self):
server = ('rotate.aprs.net',
'cwop.aprs.net')[self.fixed_data['passcode'] == '-1']
session.connect((server, 14580))
response = session.recv(4096)
response = session.recv(4096).decode('ASCII')
logger.debug('server software: %s', response.strip())
yield session

Expand All @@ -121,7 +121,7 @@ def upload_data(self, session, prepared_data={}, live=False):
packet = packet.encode('ASCII')
try:
session.sendall(login)
response = session.recv(4096)
response = session.recv(4096).decode('ASCII')
logger.debug('server login ack: %s', response.strip())
session.sendall(packet)
session.shutdown(socket.SHUT_RDWR)
Expand Down

0 comments on commit 4a3f6e4

Please sign in to comment.