diff --git a/main.py b/main.py index f6eb512..51ebeb3 100644 --- a/main.py +++ b/main.py @@ -212,8 +212,8 @@ def try_ssl_handshake(server): message = ("{prefix}Error while doing SSL handshake" ": {error}").format( - prefix=W.prefix("network"), - error=str_error) + prefix=W.prefix("network"), + error=str_error) server_buffer_prnt(server, message) @@ -242,8 +242,8 @@ def receive_cb(server_name, file_descriptor): message = ("{prefix}Error while reading from " "socket: {error}").format( - prefix=W.prefix("network"), - error=str_error) + prefix=W.prefix("network"), + error=str_error) server_buffer_prnt(server, message) diff --git a/matrix/api.py b/matrix/api.py index 14dc2db..786ab38 100644 --- a/matrix/api.py +++ b/matrix/api.py @@ -106,10 +106,10 @@ class MatrixClient: path = ("{api}/rooms/{room}/send/m.room.message/" "{tx_id}?{query_parameters}").format( - api=MATRIX_API_PATH, - room=quote(room_id), - tx_id=quote(str(self._get_txn_id())), - query_parameters=urlencode(query_parameters)) + api=MATRIX_API_PATH, + room=quote(room_id), + tx_id=quote(str(self._get_txn_id())), + query_parameters=urlencode(query_parameters)) return HttpRequest(RequestType.PUT, self.host, path, content) @@ -146,12 +146,12 @@ class MatrixClient: return HttpRequest(RequestType.PUT, self.host, path, content) def room_get_messages( - self, - room_id, - start_token, - end_token="", - limit=10, - direction='b' + self, + room_id, + start_token, + end_token="", + limit=10, + direction='b' ): query_parameters = { "access_token": self.access_token, diff --git a/matrix/server.py b/matrix/server.py index 46b8497..19ae9b1 100644 --- a/matrix/server.py +++ b/matrix/server.py @@ -224,8 +224,8 @@ class MatrixServer: message = ("{prefix}Error while writing to " "socket: {error}").format( - prefix=W.prefix("network"), - error=strerr) + prefix=W.prefix("network"), + error=strerr) server_buffer_prnt(self, message) server_buffer_prnt( @@ -242,7 +242,7 @@ class MatrixServer: server_buffer_prnt( self, "{prefix}matrix: Error while writing to socket".format( - W.prefix("network"))) + prefix=W.prefix("network"))) server_buffer_prnt( self, ("{prefix}matrix: disconnecting from server...").format( @@ -379,10 +379,10 @@ class MatrixServer: message = ("{prefix}matrix: Connecting to " "{server}:{port}{ssl}...").format( - prefix=W.prefix("network"), - server=self.address, - port=self.port, - ssl=ssl_message) + prefix=W.prefix("network"), + server=self.address, + port=self.port, + ssl=ssl_message) W.prnt(self.server_buffer, message) @@ -499,5 +499,3 @@ def send_cb(server_name, file_descriptor): server.try_send(server, server.send_buffer) return W.WEECHAT_RC_OK - -