diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2021-01-10 17:06:21 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2021-01-10 17:06:21 +0100 |
| commit | 7749b151afc3be4f33e49fc08217da2525ca71a3 (patch) | |
| tree | 02c8633965fd993303c9f1bec098045f7150afa1 | |
| parent | 09ae7bfaa82a59de988a7988312d241b07a0697c (diff) | |
| download | cyberschuessel-7749b151afc3be4f33e49fc08217da2525ca71a3.tar.gz cyberschuessel-7749b151afc3be4f33e49fc08217da2525ca71a3.zip | |
remove useless parenthesis
| -rw-r--r-- | cyberschuessel/schuessel.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cyberschuessel/schuessel.py b/cyberschuessel/schuessel.py index c79815f..7bf0faa 100644 --- a/cyberschuessel/schuessel.py +++ b/cyberschuessel/schuessel.py @@ -45,7 +45,7 @@ class Schuessel: elif last_word and last_word['word'] in self.words and last_word[ 'draw_counter'] == self.draw_counter: self.guessed.append(last_word['word']) - del (self.words[self.words.index(last_word['word'])]) + del self.words[self.words.index(last_word['word'])] if len(self.words) == 0: # empty schuessel @@ -75,7 +75,7 @@ class Schuessel: for session_id in broken_sessions: log.info(f'remove broken session_id {session_id}') - del (self.clients[session_id]) + del self.clients[session_id] async def close_all(self): for ws in list(self.clients.values()): @@ -100,7 +100,7 @@ class Schuessel: try: await ws.send_json(init_msg) except ConnectionResetError: - del (self.clients[session_id]) + del self.clients[session_id] return ws async for msg in ws: @@ -128,7 +128,7 @@ class Schuessel: 'draw_counter': self.draw_counter, }) except ConnectionResetError: - del (self.clients[session_id]) + del self.clients[session_id] return ws elif data['action'] == 'add': @@ -147,12 +147,12 @@ class Schuessel: log.error( f'unknown action received: {data} from {session_id}') elif msg.type == aiohttp.WSMsgType.ERROR: - del (self.clients[session_id]) + del self.clients[session_id] print( f'{session_id} connection closed with exception {ws.exception()}' ) - del (self.clients[session_id]) + del self.clients[session_id] log.info(f'websocket connection {session_id} closed') return ws |
