aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cyberschuessel/schuessel.py12
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