Skip to content

Commit

Permalink
Fixed bug on Python 3.4 where unpacking 2 lists in argument doesn't
Browse files Browse the repository at this point in the history
work.

Turns out unpacking multiple lists in a function's argument is new in
Python 3.5 (PEP 448).
  • Loading branch information
twisteroidambassador committed Jul 5, 2017
1 parent 1cdcb1a commit 7c93b4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ptadapter/relays.py
Expand Up @@ -122,8 +122,8 @@ def close(self):
wait_list.append(self._server)
for conn in self._connections:
conn.cancel()
yield from asyncio.gather(*wait_list, *self._connections,
return_exceptions=True)
wait_list.extend(self._connections)
yield from asyncio.gather(*wait_list, return_exceptions=True)


class ProxyNegotiator():
Expand Down Expand Up @@ -327,4 +327,4 @@ def _negotiate_proxy(self, sreader, swriter):
else:
raise ProxyNegotiationError(
'Malformed SOCKS5 reply {!r}'.format(buf))
self._logger.debug('SOCKS5 negotiation complete')
self._logger.debug('SOCKS5 negotiation complete')

0 comments on commit 7c93b4b

Please sign in to comment.