Skip to content

Commit

Permalink
Fixed python 3.8 import error
Browse files Browse the repository at this point in the history
  • Loading branch information
portaloffreedom committed Apr 1, 2020
1 parent e6f03ce commit a8e6ff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygazebo/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ async def read_raw(self):
else:
data = await self._reader.readexactly(size)
return data
except (ConnectionResetError, asyncio.streams.IncompleteReadError) as e:
except (ConnectionResetError, asyncio.IncompleteReadError) as e:
if self._closed:
return None
else:
local_addr, local_port = self._writer.transport.get_extra_info('sockname')
discarded_bytes = len(e.partial) if isinstance(e, asyncio.streams.IncompleteReadError) else None
discarded_bytes = len(e.partial) if isinstance(e, asyncio.IncompleteReadError) else None
if header is not None:
discarded_bytes += 8
raise DisconnectError(
Expand Down

0 comments on commit a8e6ff8

Please sign in to comment.