Skip to content

Commit

Permalink
Refomat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 21, 2020
1 parent e19c79e commit ae71a0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 7 additions & 5 deletions aiohttp/client_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ class UnixClientConnectorError(ClientConnectorError):
Raised in :py:class:`aiohttp.connector.UnixConnector`
if connection to unix socket can not be established.
"""
def __init__(self, path: str, connection_key: ConnectionKey,
os_error: OSError) -> None:

def __init__(
self, path: str, connection_key: ConnectionKey, os_error: OSError
) -> None:
self._path = path
super().__init__(connection_key, os_error)

Expand All @@ -178,9 +180,9 @@ def path(self) -> str:
return self._path

def __str__(self) -> str:
return ('Cannot connect to unix socket {0.path} ssl:{1} [{2}]'
.format(self, self.ssl if self.ssl is not None else 'default',
self.strerror))
return "Cannot connect to unix socket {0.path} ssl:{1} [{2}]".format(
self, self.ssl if self.ssl is not None else "default", self.strerror
)


class ServerConnectionError(ClientConnectionError):
Expand Down
4 changes: 1 addition & 3 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,7 @@ async def _create_connection(
self._factory, self._path
)
except OSError as exc:
raise UnixClientConnectorError(
self.path, req.connection_key, exc
) from exc
raise UnixClientConnectorError(self.path, req.connection_key, exc) from exc

return cast(ResponseHandler, proto)

Expand Down

0 comments on commit ae71a0d

Please sign in to comment.